diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-18 11:53:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-18 16:05:42 +0200 |
commit | 573138efec7fa28a98ba3b0301f6e0a97dac7978 (patch) | |
tree | 7559a661e13e2f3f99a0d9dc8e0a182e31cc5d3e /vcl | |
parent | 0380917ad3e0054039f9a996cfcc025d93c28dc3 (diff) |
distinguish active dnd-operation case from simple query case
Change-Id: I1d8e95e46b45c71c0c83316ab4f19ba85eddcf75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96598
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 8b3677da1c86..18a7bcd246d3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4597,9 +4597,9 @@ public: SvTabListBox& getTreeView() { return *m_xTreeView; } - virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult, bool bHighLightTarget) override + virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult, bool bDnDMode) override { - LclTabListBox* pTreeView = !bHighLightTarget ? dynamic_cast<LclTabListBox*>(m_xTreeView.get()) : nullptr; + LclTabListBox* pTreeView = !bDnDMode ? dynamic_cast<LclTabListBox*>(m_xTreeView.get()) : nullptr; SvTreeListEntry* pTarget = pTreeView ? pTreeView->GetTargetAtPoint(rPos, false) : m_xTreeView->GetDropTarget(rPos); if (pTarget && pResult) diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e1c7aa4e7260..01390a5d1fd7 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -11231,7 +11231,7 @@ public: weld::TreeView::connect_popup_menu(rLink); } - virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter* pResult, bool bHighLightTarget) override + virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter* pResult, bool bDnDMode) override { if (rPos.X() < 0 || rPos.Y() < 0) { @@ -11267,7 +11267,7 @@ public: path = gtk_tree_path_copy(lastpath); pos = GTK_TREE_VIEW_DROP_AFTER; } - else if (gtk_tree_path_compare(path, lastpath) == 0) + else if (bDnDMode && gtk_tree_path_compare(path, lastpath) == 0) { // if we're on the last entry, see if gtk thinks // the drop should be before or after it, and if @@ -11287,7 +11287,7 @@ public: gtk_tree_model_get_iter(pModel, &rGtkIter.iter, path); } - if (m_bInDrag && bHighLightTarget) // bHighLightTarget alone might be sufficient + if (m_bInDrag && bDnDMode) { // highlight the row gtk_tree_view_set_drag_dest_row(m_pTreeView, path, pos); |