mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Don't use the DnD workaround on non-gtk platforms.
This commit is contained in:
@@ -920,21 +920,25 @@ public:
|
||||
if (event.GetDataFormat() != _dndFormat)
|
||||
throw CancelException();
|
||||
|
||||
/* wxWidgets 3.0 data view DnD is borked. See
|
||||
* https://forums.wxwidgets.org/viewtopic.php?t=44752. The hit
|
||||
* detection is done against the wrong object, resulting in the
|
||||
* header size not being taken into account, so we have to manually
|
||||
* do hit detection correctly. */
|
||||
#if defined __WXGTK__
|
||||
/* wxWidgets 3.0 data view DnD on GTK is borked. See
|
||||
* https://forums.wxwidgets.org/viewtopic.php?t=44752. The hit
|
||||
* detection is done against the wrong object, resulting in the
|
||||
* header size not being taken into account, so we have to manually
|
||||
* do hit detection correctly. */
|
||||
|
||||
auto* window = browserTree->GetMainWindow();
|
||||
auto screenPos = wxGetMousePosition();
|
||||
auto relPos = screenPos - window->GetScreenPosition();
|
||||
auto* window = browserTree->GetMainWindow();
|
||||
auto screenPos = wxGetMousePosition();
|
||||
auto relPos = screenPos - window->GetScreenPosition();
|
||||
|
||||
wxDataViewItem item;
|
||||
wxDataViewColumn* column;
|
||||
browserTree->HitTest(relPos, item, column);
|
||||
if (!item.IsOk())
|
||||
throw CancelException();
|
||||
wxDataViewItem item;
|
||||
wxDataViewColumn* column;
|
||||
browserTree->HitTest(relPos, item, column);
|
||||
if (!item.IsOk())
|
||||
throw CancelException();
|
||||
#else
|
||||
auto item = event.GetItem();
|
||||
#endif
|
||||
|
||||
auto destDirNode = GetTargetDirectoryNode(item);
|
||||
if (!destDirNode)
|
||||
|
||||
Reference in New Issue
Block a user