LCL: reorder evaluation in DragStop. Patch by Artem Izmaylov. issue #41539

This commit is contained in:
zeljan1 2025-03-19 15:40:12 +01:00
parent 447b40f4c8
commit 1dd3bb3d01

View File

@ -239,7 +239,7 @@ begin
TargetPos := ADragObjectCopy.DragTargetPos //controls can override the position TargetPos := ADragObjectCopy.DragTargetPos //controls can override the position
else else
TargetPos := ADragObjectCopy.DragPos; //otherwise take the current position TargetPos := ADragObjectCopy.DragPos; //otherwise take the current position
Accepted := ADropped and SendCmDragMsg(ADragObjectCopy, dmDragLeave); Accepted := SendCmDragMsg(ADragObjectCopy, dmDragLeave) and ADropped;
ADragObjectCopy.FDropped := Accepted; ADragObjectCopy.FDropped := Accepted;
if ADragObjectCopy.DragTarget <> nil then if ADragObjectCopy.DragTarget <> nil then
@ -630,7 +630,7 @@ begin
TargetPos := ADockObjectCopy.DragTargetPos //controls can override the position TargetPos := ADockObjectCopy.DragTargetPos //controls can override the position
else else
TargetPos := ADockObjectCopy.DragPos; //otherwise take the current position TargetPos := ADockObjectCopy.DragPos; //otherwise take the current position
Accepted := Accepted and (Moved or ADockObjectCopy.Floating or SendCmDragMsg(ADockObjectCopy, dmDragLeave)) and ADropped; Accepted := (SendCmDragMsg(ADockObjectCopy, dmDragLeave) or Moved or ADockObjectCopy.Floating) and Accepted and ADropped;
ADockObjectCopy.FDropped := Accepted; ADockObjectCopy.FDropped := Accepted;
// float // float