Skip to content

Commit

Permalink
Toggle buttons working correctly when multiple editors are open (#447)
Browse files Browse the repository at this point in the history
* Toggle buttons working correctly when multiple editors are open

* Move context change logic out of the commands

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
arjxn-py and pre-commit-ci[bot] authored Oct 8, 2024
1 parent d97fe65 commit 7f7d28a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/base/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,10 @@ export function addCommands(
icon: wireframeIcon
});

tracker.currentChanged.connect(() => {
commands.notifyCommandChanged(CommandIDs.wireframe);
});

commands.addCommand(CommandIDs.chamfer, {
label: trans.__('Make chamfer'),
isEnabled: () => {
Expand Down Expand Up @@ -1071,6 +1075,10 @@ export function addCommands(
}
});

tracker.currentChanged.connect(() => {
commands.notifyCommandChanged(CommandIDs.updateClipView);
});

commands.addCommand(CommandIDs.exportJcad, {
label: trans.__('Export to .jcad'),
isEnabled: () => {
Expand Down

0 comments on commit 7f7d28a

Please sign in to comment.