mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 20:41:16 +02:00
LCL: fixed dragging over a splitter (bug #2058) from Paul Ishenin
git-svn-id: trunk@10505 -
This commit is contained in:
parent
670108df05
commit
b6299f483a
@ -407,7 +407,7 @@ type
|
||||
procedure SetResizeControl(const AValue: TControl);
|
||||
procedure SetResizeStyle(const AValue: TResizeStyle);
|
||||
protected
|
||||
procedure StartSplitterMove(Restart: boolean; const MouseXY: TPoint);
|
||||
procedure StartSplitterMove(const MouseXY: TPoint);
|
||||
procedure MouseDown(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
|
||||
procedure MouseMove(Shift: TShiftState; X,Y: Integer); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
|
||||
|
@ -492,10 +492,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomSplitter.StartSplitterMove(Restart: boolean;
|
||||
const MouseXY: TPoint);
|
||||
procedure TCustomSplitter.StartSplitterMove(const MouseXY: TPoint);
|
||||
begin
|
||||
if (not Restart) and FSplitDragging then exit;
|
||||
if FSplitDragging then exit;
|
||||
FSplitDragging := True;
|
||||
fSplitterStartMouseXY := MouseXY;
|
||||
fSplitterStartLeftTop := Point(Left,Top);
|
||||
@ -509,7 +508,7 @@ begin
|
||||
inherited MouseDown(Button, Shift, X, Y);
|
||||
// While resizing X, Y are not valid. Use absolute mouse position.
|
||||
GetCursorPos(MousePos);
|
||||
StartSplitterMove(True,MousePos);
|
||||
StartSplitterMove(MousePos);
|
||||
end;
|
||||
|
||||
procedure TCustomSplitter.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||
@ -518,11 +517,10 @@ var
|
||||
MousePos: TPoint;
|
||||
begin
|
||||
inherited MouseMove(Shift, X, Y);
|
||||
if (ssLeft in Shift) and (Parent <> nil) then begin
|
||||
if (ssLeft in Shift) and (Parent <> nil) and (FSplitDragging) then
|
||||
begin
|
||||
// While resizing X, Y are not valid. Use the absolute mouse position.
|
||||
GetCursorPos(MousePos);
|
||||
StartSplitterMove(False,MousePos);
|
||||
|
||||
case ResizeAnchor of
|
||||
akLeft, akRight:
|
||||
Offset := (MousePos.X-fSplitterStartMouseXY.X)
|
||||
|
Loading…
Reference in New Issue
Block a user