cui/source/dialogs/hlmarkwn.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit ff1c7080086191a5a7670d20b59936fcb79a91dc
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Wed Nov 23 23:05:52 2022 -0900
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Sat Nov 26 07:15:03 2022 +0100

    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 <rayk...@gmail.com>

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;
 }
 

Reply via email to