mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:59:31 +02:00
IDE: SourceEditor: reduce work when applying global options
git-svn-id: trunk@39958 -
This commit is contained in:
parent
4d2e6cf9be
commit
d67ac0c78c
13
ide/main.pp
13
ide/main.pp
@ -4780,10 +4780,15 @@ begin
|
||||
if Restore then exit;
|
||||
if Project1<>nil then
|
||||
Project1.UpdateAllSyntaxHighlighter;
|
||||
UpdateHighlighters(True);
|
||||
SourceEditorManager.ReloadEditorOptions;
|
||||
ReloadMenuShortCuts;
|
||||
UpdateMacroListViewer;
|
||||
SourceEditorManager.BeginGlobalUpdate;
|
||||
try
|
||||
UpdateHighlighters(True);
|
||||
SourceEditorManager.ReloadEditorOptions;
|
||||
ReloadMenuShortCuts;
|
||||
UpdateMacroListViewer;
|
||||
finally
|
||||
SourceEditorManager.EndGlobalUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoCodetoolsOptionsAfterWrite(Sender: TObject; Restore: boolean);
|
||||
|
@ -1060,6 +1060,8 @@ type
|
||||
procedure OnIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure LockAllEditorsInSourceChangeCache;
|
||||
procedure UnlockAllEditorsInSourceChangeCache;
|
||||
procedure BeginGlobalUpdate;
|
||||
procedure EndGlobalUpdate;
|
||||
procedure CloseFile(AEditor: TSourceEditorInterface);
|
||||
// history jumping
|
||||
procedure HistoryJump(Sender: TObject; CloseAction: TJumpHistoryAction);
|
||||
@ -9654,6 +9656,22 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManager.BeginGlobalUpdate;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
for i:=0 to SourceEditorCount - 1 do
|
||||
SourceEditors[i].BeginGlobalUpdate;
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManager.EndGlobalUpdate;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
for i:=0 to SourceEditorCount - 1 do
|
||||
SourceEditors[i].EndGlobalUpdate;
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManager.CloseFile(AEditor: TSourceEditorInterface);
|
||||
var
|
||||
i, j: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user