mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-12 11:20:38 +01:00
SynEdit: ensure primary selection is acquired (only focused or explicit user action)
git-svn-id: trunk@34619 -
This commit is contained in:
parent
f10bff7b73
commit
38d0f983df
@ -2597,6 +2597,7 @@ begin
|
|||||||
FreeMem(Data);
|
FreeMem(Data);
|
||||||
end;
|
end;
|
||||||
UpdateCursor;
|
UpdateCursor;
|
||||||
|
SelAvailChange(nil);
|
||||||
//DebugLn('[TCustomSynEdit.KeyDown] END ',dbgs(Key),' ',dbgs(Shift));
|
//DebugLn('[TCustomSynEdit.KeyDown] END ',dbgs(Key),' ',dbgs(Shift));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3063,6 +3064,7 @@ begin
|
|||||||
inherited MouseDown(Button, Shift, X, Y);
|
inherited MouseDown(Button, Shift, X, Y);
|
||||||
LCLIntf.SetFocus(Handle);
|
LCLIntf.SetFocus(Handle);
|
||||||
UpdateCaret;
|
UpdateCaret;
|
||||||
|
SelAvailChange(nil);
|
||||||
//debugln('TCustomSynEdit.MouseDown END sfWaitForDragging=',dbgs(sfWaitForDragging in fStateFlags),' ');
|
//debugln('TCustomSynEdit.MouseDown END sfWaitForDragging=',dbgs(sfWaitForDragging in fStateFlags),' ');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3293,6 +3295,7 @@ begin
|
|||||||
PopupMenu.PopupComponent:=self;
|
PopupMenu.PopupComponent:=self;
|
||||||
PopupMenu.PopUp;
|
PopupMenu.PopUp;
|
||||||
end;
|
end;
|
||||||
|
SelAvailChange(nil);
|
||||||
//DebugLn('TCustomSynEdit.MouseUp END Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y);
|
//DebugLn('TCustomSynEdit.MouseUp END Mouse=',X,',',Y,' Caret=',CaretX,',',CaretY,', BlockBegin=',BlockBegin.X,',',BlockBegin.Y,' BlockEnd=',BlockEnd.X,',',BlockEnd.Y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3662,7 +3665,7 @@ end;
|
|||||||
procedure TCustomSynEdit.DoBlockSelectionChanged(Sender : TObject);
|
procedure TCustomSynEdit.DoBlockSelectionChanged(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
StatusChanged([scSelection]);
|
StatusChanged([scSelection]);
|
||||||
//if HandleAllocated and Focused then
|
if HandleAllocated and Focused then
|
||||||
SelAvailChange(nil);
|
SelAvailChange(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user