mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:39:37 +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
|
||||
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))
|
||||
or (Abs(fMouseDownY - Y) >= GetSystemMetrics(SM_CYDRAG))
|
||||
then begin
|
||||
Exclude(fStateFlags, sfWaitForDragging);
|
||||
BeginDrag(false);
|
||||
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);
|
||||
if (X >= fGutterWidth)
|
||||
and (X < ClientWidth{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF})
|
||||
@ -2013,9 +2015,9 @@ begin
|
||||
inherited MouseUp(Button, Shift, X, Y);
|
||||
fScrollTimer.Enabled := False;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
MouseCapture := False;
|
||||
if (X>=ClientWidth-ScrollBarWidth) or (Y>=ClientHeight-ScrollBarWidth) then
|
||||
begin
|
||||
MouseCapture := False;
|
||||
exit;
|
||||
end;
|
||||
LastMouseCaret:=PixelsToRowColumn(Point(X,Y));
|
||||
|
Loading…
Reference in New Issue
Block a user