mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 20:59:12 +02:00
SynEdit: Temporarily allow painting during paintlock (the lesser of two evils)
git-svn-id: trunk@28534 -
This commit is contained in:
parent
75c181bb33
commit
bdff583eba
@ -2718,7 +2718,7 @@ procedure TCustomSynEdit.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
|||||||
var
|
var
|
||||||
CType: TSynMAClickCount;
|
CType: TSynMAClickCount;
|
||||||
begin
|
begin
|
||||||
//DebugLn('TCustomSynEdit.MouseDown START Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y);
|
//DebugLn(['TCustomSynEdit.MouseDown START Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y]);
|
||||||
Exclude(FStateFlags, sfHideCursor);
|
Exclude(FStateFlags, sfHideCursor);
|
||||||
FInMouseClickEvent := True;
|
FInMouseClickEvent := True;
|
||||||
if (X>=ClientWidth-ScrollBarWidth) or (Y>=ClientHeight-ScrollBarWidth) then
|
if (X>=ClientWidth-ScrollBarWidth) or (Y>=ClientHeight-ScrollBarWidth) then
|
||||||
@ -3028,8 +3028,13 @@ begin
|
|||||||
|
|
||||||
If FPaintLock > 0 then begin
|
If FPaintLock > 0 then begin
|
||||||
debugln(['Warning: SynEdit.Paint called during PaintLock']);
|
debugln(['Warning: SynEdit.Paint called during PaintLock']);
|
||||||
types.IntersectRect(FInvalidateRect, FInvalidateRect, rcClip);
|
if FInvalidateRect.Top < 0 then
|
||||||
exit
|
FInvalidateRect := rcClip
|
||||||
|
else
|
||||||
|
types.UnionRect(FInvalidateRect, FInvalidateRect, rcClip);
|
||||||
|
// Todo: painting is not save
|
||||||
|
FHighlighter.ScanRanges; // at least prevent some dangers
|
||||||
|
//exit;
|
||||||
end;
|
end;
|
||||||
{$IFDEF EnableDoubleBuf}
|
{$IFDEF EnableDoubleBuf}
|
||||||
//rcClip:=Rect(0,0,ClientWidth,ClientHeight);
|
//rcClip:=Rect(0,0,ClientWidth,ClientHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user