summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-11-23 23:05:52 -0900
committerJim Raykowski <raykowj@gmail.com>2022-11-26 07:15:03 +0100
commitff1c7080086191a5a7670d20b59936fcb79a91dc (patch)
treecd7503c902d2f26a7aae983f6a771ea3b378d919 /cui
parent9a2d15d3358816043016af79588e0eb3bb2fa5ef (diff)
tdf#152115 related: Make selected entry stay selected (gtk3 only)
For unknown reason the selected entry loses selection here only for gtk3. Swapping the order of the select and scroll_to_row functions makes the selection remain selected for gtk3. This patch replaces the select and scroll_to_row functions with the set_cursor function which makes the focused entry selected and shown in the visible range as expected for gtk3 as well as x11 and qt5. Change-Id: If003afa73851573e61704cc847d7152db90a0d14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143207 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index ff7730db55c0..04b50b44e309 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -456,8 +456,7 @@ bool SvxHlinkDlgMarkWnd::SelectEntry(std::u16string_view aStrMark)
std::unique_ptr<weld::TreeIter> xEntry = FindEntry(aStrMark);
if (!xEntry)
return false;
- mxLbTree->select(*xEntry);
- mxLbTree->scroll_to_row(*xEntry);
+ mxLbTree->set_cursor(*xEntry);
return true;
}