Fix 1: ribbon icon not deactivated

This commit is contained in:
Sebastian 2026-06-23 23:24:36 +02:00 • committed by Hakan Seven
commit d430981da3
2 changed files with 8 additions and 52 deletions

View file

@ -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();
}