diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-20 10:05:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-20 13:41:32 +0100 |
commit | 19116d1061b287eef600ec6b3f46c362a4abd405 (patch) | |
tree | 8fe747c4b27aa9156163adaba410eaa635712a6c /vcl | |
parent | eee6ef53ebc5756a974e985925550dcd990876ca (diff) |
consistency wrt notification events for treeview cursor change
Change-Id: I4ecc13cd7163304c0fa1683e75299d03ccc06446
Reviewed-on: https://gerrit.libreoffice.org/83283
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 0e72f42d14c6..e84c989841fa 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3694,6 +3694,7 @@ public: virtual void set_cursor(int pos) override { + disable_notify_events(); if (pos == -1) m_xTreeView->SetCurEntry(nullptr); else @@ -3701,6 +3702,7 @@ public: SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos); m_xTreeView->SetCurEntry(pEntry); } + enable_notify_events(); } virtual void scroll_to_row(int pos) override diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 61ba40b9fa1c..3bc15169c01f 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -8813,9 +8813,11 @@ public: virtual void set_cursor(int pos) override { + disable_notify_events(); GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1); gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false); gtk_tree_path_free(path); + enable_notify_events(); } virtual void scroll_to_row(int pos) override @@ -9307,11 +9309,13 @@ public: virtual void set_cursor(const weld::TreeIter& rIter) override { + disable_notify_events(); 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_set_cursor(m_pTreeView, path, nullptr, false); gtk_tree_path_free(path); + enable_notify_events(); } virtual bool get_iter_first(weld::TreeIter& rIter) const override @@ -10170,11 +10174,13 @@ public: virtual void set_cursor(const weld::TreeIter& rIter) override { + disable_notify_events(); 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_icon_view_set_cursor(m_pIconView, path, nullptr, false); gtk_tree_path_free(path); + enable_notify_events(); } virtual bool get_iter_first(weld::TreeIter& rIter) const override |