ide: ToolBar sync now lazy (improves the speed of editor)

git-svn-id: svn://ultimatepp.org/upp/trunk@12844 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-03-17 09:09:13 +00:00
parent 2c43509493
commit 6bc6b5912e
2 changed files with 5 additions and 1 deletions

View file

@ -1085,6 +1085,8 @@ public:
void SetBar();
void SetMenuBar();
void SetToolBar();
TimeCallback delayed_toolbar;
void UpdateFormat(CodeEditor& editor);
void UpdateFormat();

View file

@ -386,7 +386,9 @@ Ide::Ide()
DiffDlg::WhenHighlight = callback(sHighlightLine);
editor.theide = this;
editor.WhenSel = THISBACK(SetToolBar);
editor.WhenSel << [=] {
delayed_toolbar.KillSet(150, [=] { SetToolBar(); });
};
editormode = false;