mirror of https://gitlab.com/basile.b/dexed.git
fix #219 - Highlighter presets editor broken when building with Laz 1.8
This commit is contained in:
parent
95d98216df
commit
e815013bd9
|
@ -99,6 +99,8 @@ type
|
||||||
procedure propEdModified(sender: TObject);
|
procedure propEdModified(sender: TObject);
|
||||||
procedure updateList;
|
procedure updateList;
|
||||||
procedure updateEditor;
|
procedure updateEditor;
|
||||||
|
protected
|
||||||
|
procedure SetVisible(Value: Boolean); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
@ -273,6 +275,24 @@ begin
|
||||||
StyleMask:=stlMsk;
|
StyleMask:=stlMsk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCED2SynPresetsLoaderForm.SetVisible(Value: Boolean);
|
||||||
|
var
|
||||||
|
firstTime: boolean;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
// extracted from the ctor : lazarus 1.8 regression
|
||||||
|
firstTime := fList.ItemIndex = -1;
|
||||||
|
if value and (firstTime or (fList.Items.Count >= 0)) then
|
||||||
|
begin
|
||||||
|
fEditor.Font.Assign(EditorOptions.font);
|
||||||
|
fEditor.Font.Size:=12;
|
||||||
|
fEditor.Font.Name:=EditorOptions.font.Name;
|
||||||
|
if firstTime then
|
||||||
|
fList.ItemIndex := 0;
|
||||||
|
lstBoxSelChange(nil);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TCED2SynPresetsLoaderForm.Create(AOwner: TComponent);
|
constructor TCED2SynPresetsLoaderForm.Create(AOwner: TComponent);
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
|
@ -512,6 +532,7 @@ begin
|
||||||
fEditor.lines.Add(' int number = 0xDEADBEEF;');
|
fEditor.lines.Add(' int number = 0xDEADBEEF;');
|
||||||
fEditor.lines.Add(' asm{ xor RAX, RAX; }');
|
fEditor.lines.Add(' asm{ xor RAX, RAX; }');
|
||||||
fEditor.lines.Add(' int error = 12G;');
|
fEditor.lines.Add(' int error = 12G;');
|
||||||
|
fEditor.lines.Add(' alias fun = () => {};');
|
||||||
fEditor.lines.Add('}');
|
fEditor.lines.Add('}');
|
||||||
pnl := TPanel.Create(self);
|
pnl := TPanel.Create(self);
|
||||||
pnl.Parent := self;
|
pnl.Parent := self;
|
||||||
|
@ -562,7 +583,6 @@ begin
|
||||||
fPropEd.PropertyEditorHook.AddHandlerModified(@propEdModified);
|
fPropEd.PropertyEditorHook.AddHandlerModified(@propEdModified);
|
||||||
//
|
//
|
||||||
fList.ItemIndex := 0;
|
fList.ItemIndex := 0;
|
||||||
//lstBoxSelChange(nil);
|
|
||||||
EntitiesConnector.addObserver(self);
|
EntitiesConnector.addObserver(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue