diff options
author | Eike Rathke <erack@redhat.com> | 2021-09-13 16:24:23 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-09-30 11:01:51 +0200 |
commit | fba5d90f6614fbdd0e6cb190e78dd37065f4f784 (patch) | |
tree | e3417fcdbb5c210bdc034fc5b3887913736fd0f0 /cui | |
parent | exernal/firebird: extern/cloop: Missing dependencies of compilations on... (diff) | |
download | core-fba5d90f6614fbdd0e6cb190e78dd37065f4f784.tar.gz core-fba5d90f6614fbdd0e6cb190e78dd37065f4f784.zip |
Explicitly set cursor position for x11 'gen' backend, tdf#144457 follow-up
... (and other backends?)
Change-Id: If45b83080aa2df50ef27ad282eb6fa1d4a022703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122037
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 37e2e99f7a3018dce0337b582b139d41e1e81a9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122060
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index b5c6bcb49584..a36aac47abc3 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1819,7 +1819,13 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, weld::Entry&, rEd, void ) } } if (bModified) - rEd.set_text(aBuf.makeStringAndClear()); // This even keeps the cursor position so all good. + { + // gtk3 keeps the cursor position on equal length set_text() but at + // least the 'gen' backend does not and resets to 0. + const int nCursorPos = rEd.get_position(); + rEd.set_text(aBuf.makeStringAndClear()); + rEd.set_position(nCursorPos); + } if (bValid) rEd.set_message_type(weld::EntryMessageType::Normal); else |