mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-06 14:39:39 +01:00
lcl: fix multi click control style to target control.
git-svn-id: trunk@51735 -
This commit is contained in:
parent
ee08798b5e
commit
7b141be77b
@ -2991,6 +2991,7 @@ const
|
|||||||
|
|
||||||
var
|
var
|
||||||
IsMultiClick: boolean;
|
IsMultiClick: boolean;
|
||||||
|
TargetControl: TControl;
|
||||||
begin
|
begin
|
||||||
Result := LM_NULL;
|
Result := LM_NULL;
|
||||||
|
|
||||||
@ -3022,10 +3023,16 @@ begin
|
|||||||
LastMouse.ClickCount := 1;
|
LastMouse.ClickCount := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if LastMouse.ClickCount > 1 then
|
||||||
|
begin
|
||||||
|
TargetControl := AWinControl.ControlAtPos(AWinControl.ScreenToClient(AMousePos), [capfHasScrollOffset]);
|
||||||
|
if TargetControl=nil then
|
||||||
|
TargetControl := AWinControl;
|
||||||
case LastMouse.ClickCount of
|
case LastMouse.ClickCount of
|
||||||
2: if not(csDoubleClicks in AWinControl.ControlStyle) then LastMouse.ClickCount := 1;
|
2: if not(csDoubleClicks in TargetControl.ControlStyle) then LastMouse.ClickCount := 1;
|
||||||
3: if not(csTripleClicks in AWinControl.ControlStyle) then LastMouse.ClickCount := 1;
|
3: if not(csTripleClicks in TargetControl.ControlStyle) then LastMouse.ClickCount := 1;
|
||||||
4: if not(csQuadClicks in AWinControl.ControlStyle) then LastMouse.ClickCount := 1;
|
4: if not(csQuadClicks in TargetControl.ControlStyle) then LastMouse.ClickCount := 1;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
LastMouse.Down := AMouseDown;
|
LastMouse.Down := AMouseDown;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user