mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 02:41:51 +02:00
SynEdit: check AnOwner for gutter parts
This commit is contained in:
parent
6b352d830e
commit
11e23ff696
@ -213,7 +213,7 @@ type
|
||||
property MarkupInfoCurLineMerged: TSynSelectedColorMergeResult read FMarkupInfoCurLineMerged;
|
||||
property CaretRow: integer read GetCaretRow;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
constructor Create(AnOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
property Left: Integer read FLeft;
|
||||
@ -822,8 +822,11 @@ begin
|
||||
Result := SynEdit.Scale96ToFont(Result);
|
||||
end;
|
||||
|
||||
constructor TSynGutterPartBase.Create(AOwner: TComponent);
|
||||
constructor TSynGutterPartBase.Create(AnOwner: TComponent);
|
||||
begin
|
||||
if (AnOwner = nil) or not(AnOwner is TSynGutterPartListBase) then
|
||||
raise Exception.Create('Invalid Owner');
|
||||
|
||||
FMarkupInfo := TSynSelectedColor.Create;
|
||||
FMarkupInfo.Background := clBtnFace;
|
||||
FMarkupInfo.Foreground := clNone;
|
||||
@ -843,7 +846,7 @@ begin
|
||||
FAutoSize := True;
|
||||
FLeftOffset := 0;
|
||||
FRightOffset := 0;
|
||||
Inherited Create(AOwner); // Todo: Lock the DoChange from RegisterItem, and call DoChange at the end (after/in autosize)
|
||||
Inherited Create(AnOwner); // Todo: Lock the DoChange from RegisterItem, and call DoChange at the end (after/in autosize)
|
||||
|
||||
FMarkupInfo.OnChange := @DoColorChanged;
|
||||
FMarkupInfoCurrentLine.OnChange := @DoColorChanged;
|
||||
|
Loading…
Reference in New Issue
Block a user