From fe14d907f864f7feb50ea873400e722b3adccc61 Mon Sep 17 00:00:00 2001 From: Hendi <10466210-Hendi48@users.noreply.gitlab.com> Date: Sat, 15 Feb 2025 21:08:21 +0100 Subject: [PATCH] VirtualTreeView: Cancel drag when context menu opens On non-Windows widgetsets, a drag operation is started when right-clicking on an item in a tree that has a popup menu and right-click selection enabled. --- components/virtualtreeview/laz.virtualtrees.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/components/virtualtreeview/laz.virtualtrees.pas b/components/virtualtreeview/laz.virtualtrees.pas index ab1d780d45..2615fe1e5f 100644 --- a/components/virtualtreeview/laz.virtualtrees.pas +++ b/components/virtualtreeview/laz.virtualtrees.pas @@ -16658,6 +16658,7 @@ var begin {$ifdef DEBUG_VTV}Logger.EnterMethod([lcMessages],'WMContextMenu');{$endif} DoStateChange([], [tsClearPending, tsEditPending, tsOLEDragPending, tsVCLDragPending]); + CancelDrag; {$ifdef ContextMenuBeforeMouseUp} if Assigned(PopupMenu) then begin