vcl/unx/gtk3/gtk3gtkinst.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4e755e622f2d782d657626b6234fb3acd3d08e15
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 4 17:04:07 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Mar 4 21:38:35 2020 +0100

    scroll to the row when putting the cursor in it
    
    Change-Id: If1edbf1d0f94176a12a9359c17179301304f2c56
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89988
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 8c384f5477df..a79a3b6fa654 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -9560,6 +9560,7 @@ public:
     {
         disable_notify_events();
         GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1);
+        gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
         gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
         gtk_tree_path_free(path);
         enable_notify_events();
@@ -10064,6 +10065,7 @@ public:
         const GtkInstanceTreeIter& rGtkIter = static_cast<const 
GtkInstanceTreeIter&>(rIter);
         GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore);
         GtkTreePath* path = gtk_tree_model_get_path(pModel, 
const_cast<GtkTreeIter*>(&rGtkIter.iter));
+        gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
         gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
         gtk_tree_path_free(path);
         enable_notify_events();
@@ -10614,6 +10616,7 @@ public:
         }
         g_list_free(pRenderers);
 
+        gtk_tree_view_scroll_to_cell(m_pTreeView, path, pColumn, false, 0, 0);
         gtk_tree_view_set_cursor(m_pTreeView, path, pColumn, true);
 
         gtk_tree_path_free(path);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to