diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index 630efcce0..9e1e2f638 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -1085,6 +1085,8 @@ public: void SetBar(); void SetMenuBar(); void SetToolBar(); + TimeCallback delayed_toolbar; + void UpdateFormat(CodeEditor& editor); void UpdateFormat(); diff --git a/uppsrc/ide/idewin.cpp b/uppsrc/ide/idewin.cpp index 06841a059..60aa908ac 100644 --- a/uppsrc/ide/idewin.cpp +++ b/uppsrc/ide/idewin.cpp @@ -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;