[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 13 16:29:07 UTC 2021
cui/source/options/optgdlg.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 2adcd82658f8c536e8288b4906b005b8ebe3fbb8
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Sep 13 16:24:23 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Sep 13 18:28:33 2021 +0200
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 at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 37e2e99f7a3018dce0337b582b139d41e1e81a9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122059
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 4d376043ced7..baa96ad3166c 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1783,7 +1783,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
More information about the Libreoffice-commits
mailing list