mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:00:26 +02:00
IDE: create TMacroListView only when needed
This commit is contained in:
parent
db88c83b22
commit
5ed7fcd92c
@ -394,11 +394,13 @@ end;
|
||||
|
||||
procedure LoadProjectSpecificInfo(XMLConfig: TXMLConfig);
|
||||
begin
|
||||
MacroListViewer.FIgnoreMacroChanges := True;
|
||||
if MacroListView<>nil then
|
||||
MacroListView.FIgnoreMacroChanges := True;
|
||||
try
|
||||
EditorMacroListProj.ReadFromXmlConf(XMLConfig, '');
|
||||
finally
|
||||
MacroListViewer.FIgnoreMacroChanges := False;
|
||||
if MacroListView<>nil then
|
||||
MacroListView.FIgnoreMacroChanges := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -415,7 +417,8 @@ var
|
||||
Filename: String;
|
||||
XMLConfig: TXMLConfig;
|
||||
begin
|
||||
MacroListViewer.FIgnoreMacroChanges := True;
|
||||
if MacroListView<>nil then
|
||||
MacroListView.FIgnoreMacroChanges := True;
|
||||
Filename := TrimFilename(AppendPathDelim(GetPrimaryConfigPath)+GlobalConfFileName);
|
||||
try
|
||||
XMLConfig := TXMLConfig.Create(Filename);
|
||||
@ -429,7 +432,8 @@ begin
|
||||
DebugLn('[EditorMacroListViewer.LoadGlobalInfo] error reading "',Filename,'": ',E.Message);
|
||||
end;
|
||||
end;
|
||||
MacroListViewer.FIgnoreMacroChanges := False;
|
||||
if MacroListView<>nil then
|
||||
MacroListView.FIgnoreMacroChanges := False;
|
||||
end;
|
||||
|
||||
procedure SaveGlobalInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user