mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 05:39:18 +02:00
SynEdit: Fixes for caret. Recreate persistent caret / stop using RespondToFocus (QT issue)
git-svn-id: trunk@27097 -
This commit is contained in:
parent
abc928b804
commit
9c570545dd
@ -4571,6 +4571,7 @@ begin
|
||||
{$IFDEF VerboseFocus}
|
||||
DebugLn('[TCustomSynEdit.WMSetFocus] A ',Name,':',ClassName);
|
||||
{$ENDIF}
|
||||
FScreenCaret.DestroyCaret; // Ensure recreation. On Windows only one caret exists, and it must be moved to the focused editor
|
||||
FScreenCaret.Visible := True;
|
||||
//if FHideSelection and SelAvail then
|
||||
// Invalidate;
|
||||
|
@ -1548,6 +1548,7 @@ end;
|
||||
constructor TSynEditScreenCaret.Create(AHandle: HWND);
|
||||
begin
|
||||
inherited Create;
|
||||
FPersistentCaret := False;
|
||||
FHandle := AHandle;
|
||||
FVisible := False;
|
||||
FCurrentVisible := False;
|
||||
@ -1687,10 +1688,14 @@ end;
|
||||
|
||||
procedure TSynEditScreenCaret.SetPersistentCaret(const AValue: Boolean);
|
||||
begin
|
||||
if FPersistentCaret = AValue then exit;
|
||||
FPersistentCaret := AValue;
|
||||
if FCurrentCreated then
|
||||
SetCaretRespondToFocus(Handle, not FPersistentCaret);
|
||||
(* Do nothing, keep Value always False.
|
||||
Most Widgetsets do not even implement it. SynEdit handles it in WMSetFocus/WMKillFocus
|
||||
QT goes weird, if it is set
|
||||
*)
|
||||
//if FPersistentCaret = AValue then exit;
|
||||
//FPersistentCaret := AValue;
|
||||
//if FCurrentCreated then
|
||||
// SetCaretRespondToFocus(Handle, not FPersistentCaret);
|
||||
end;
|
||||
|
||||
procedure TSynEditScreenCaret.SetClipBottom(const AValue: Integer);
|
||||
|
Loading…
Reference in New Issue
Block a user