blikblum/VirtualTreeView-Lazarus

Dragging nodes with "DragType" to "dtVCL" and "Right click select" cause erratic behavior

Opened this issue · 2 comments

I'm implementing D&D to move nodes in VirtualTreeView and I think I've encountered a bug on both Linux and Windows when I set "DragType" to "dtVCL" and "Right click select" to "true".

On windows, right click sometimes does not work. Nothing happens. Some time, you have to double right click to select a node and show popup. On Linux(Ubuntu at least), it is bit worse. Right click some times triggers dragging. On Mac, it is similar to Ubuntu but, since Cocoa interface is currently unstable, other things did not work properly either. So I did not test it further on Mac.

I am aware dtVCL is sort of a deprecated option for the original VirtualTreeview. However, since there is no ActiveX for Linux, dtVCL is the only way to drag nodes around.

I've created the simplest project file to recreate the behavior.

VT-Test.zip (3.3 kB)
https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=40061.0;attach=25252

Windows 10:
Lazarus 1.8.0 r56594 FPC 3.0.4 x86_64-win64-win32/win64

Ubuntu 17.10:
Lazarus 1.8.0 rc4+dfsg-1 FPC 3.0.2 x86_64-linux-gtk2

MacOS 10.13.3 High Sierra:
Lazarus 1.8.0 rexported FPC 3.0.4 i386-darwin-carbon

I tested with Windows 10 and Ubuntu Mate and worked fine

VTV from v5 branch

Tested this app (modified to handle right click) and works fine: https://github.com/blikblum/VirtualTreeView-Lazarus/tree/lazarus_master/Demos/dragdrop.

Both with left and right click

The Lazarus version is a bit outdated rev 54005 for windows and rev 53791 for the linux.

Will update for a newer version to test

I think it has something to do with other VTV options such as toMultiSelect, toRightClickSelect and PopupMenu. I mean the combination of those options...