From 0f544d4699a1fa8df013e10ec598f7af07e830b0 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 26 Oct 2024 16:55:42 +0800 Subject: [PATCH] bugfix --- bricks/toolbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bricks/toolbar.js b/bricks/toolbar.js index ccc1c5a..03a8abc 100755 --- a/bricks/toolbar.js +++ b/bricks/toolbar.js @@ -78,6 +78,7 @@ bricks.Toolbar = class extends bricks.Layout { } remove_item(w, event){ this.bar.remove_widget(w); + this.bar.unselect_item(w); this.toolList.remove(w); w.unbind('click',this.do_handle.bind(this, w)); this.dispatch('remove', w.tool_opts); @@ -92,6 +93,7 @@ bricks.Toolbar = class extends bricks.Layout { if (this.opts.target){ d.target = this.opts.target; } + this.bar.select_item(tool); this.dispatch('command', d); this.dispatch(tool.tool_opts.name, d); bricks.debug('event ', tool.tool_opts.name, ' fired ...')