forked from 1b-agent/opencadstudio-upstream
Fix 1: ribbon icon not deactivated
This commit is contained in:
1 parent
dcfaed0182
commit
d430981da3
2 files changed
+8
-52
No files matched your search
@@ -59,6 +59,14 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
if crate::plugin::try_dispatch(self, i, cmd) {
|
||||
// try_dispatch returns true for both finished commands and interactive
|
||||
// commands that it just installed. If no command is now active, the
|
||||
// tool was a one-shot and we must turn the ribbon highlight off here —
|
||||
// normally apply_cmd_result does that, but plugin dispatch can return
|
||||
// without producing a CmdResult.
|
||||
if self.tabs[i].active_cmd.is_none() {
|
||||
self.ribbon.deactivate_tool();
|
||||
}
|
||||
return Task::none();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user