mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 21:19:14 +02:00
MG: fixed synedit dragging without mousecapture
git-svn-id: trunk@2231 -
This commit is contained in:
parent
8725ec61f1
commit
41e91ac873
@ -1882,14 +1882,16 @@ begin
|
|||||||
If Cursor <> crDefault then
|
If Cursor <> crDefault then
|
||||||
Cursor := crDefault;
|
Cursor := crDefault;
|
||||||
|
|
||||||
if MouseCapture and (sfWaitForDragging in fStateFlags) then begin
|
if {$IFNDEF SYN_LAZARUS}MouseCapture and{$ENDIF}
|
||||||
|
(sfWaitForDragging in fStateFlags) then begin
|
||||||
if (Abs(fMouseDownX - X) >= GetSystemMetrics(SM_CXDRAG))
|
if (Abs(fMouseDownX - X) >= GetSystemMetrics(SM_CXDRAG))
|
||||||
or (Abs(fMouseDownY - Y) >= GetSystemMetrics(SM_CYDRAG))
|
or (Abs(fMouseDownY - Y) >= GetSystemMetrics(SM_CYDRAG))
|
||||||
then begin
|
then begin
|
||||||
Exclude(fStateFlags, sfWaitForDragging);
|
Exclude(fStateFlags, sfWaitForDragging);
|
||||||
BeginDrag(false);
|
BeginDrag(false);
|
||||||
end;
|
end;
|
||||||
end else if (ssLeft in Shift) and MouseCapture then begin
|
end else if (ssLeft in Shift) {$IFNDEF SYN_LAZARUS}and MouseCapture{$ENDIF}
|
||||||
|
then begin
|
||||||
//writeln(' TCustomSynEdit.MouseMove CAPTURE Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y,' Client=',ClientWidth-ScrollBarWidth,',',ClientHeight-ScrollBarWidth);
|
//writeln(' TCustomSynEdit.MouseMove CAPTURE Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y,' Client=',ClientWidth-ScrollBarWidth,',',ClientHeight-ScrollBarWidth);
|
||||||
if (X >= fGutterWidth)
|
if (X >= fGutterWidth)
|
||||||
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
||||||
@ -2013,9 +2015,9 @@ begin
|
|||||||
inherited MouseUp(Button, Shift, X, Y);
|
inherited MouseUp(Button, Shift, X, Y);
|
||||||
fScrollTimer.Enabled := False;
|
fScrollTimer.Enabled := False;
|
||||||
{$IFDEF SYN_LAZARUS}
|
{$IFDEF SYN_LAZARUS}
|
||||||
|
MouseCapture := False;
|
||||||
if (X>=ClientWidth-ScrollBarWidth) or (Y>=ClientHeight-ScrollBarWidth) then
|
if (X>=ClientWidth-ScrollBarWidth) or (Y>=ClientHeight-ScrollBarWidth) then
|
||||||
begin
|
begin
|
||||||
MouseCapture := False;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
LastMouseCaret:=PixelsToRowColumn(Point(X,Y));
|
LastMouseCaret:=PixelsToRowColumn(Point(X,Y));
|
||||||
|
Loading…
Reference in New Issue
Block a user