Skip to content

Commit

Permalink
fix: refresh toolbox when procedure gets created/renamed (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverben authored Oct 11, 2024
1 parent a334f90 commit 37520bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/components/workspace/blocks/Blocks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ onMount(() => {
);
updateSizing();
$workspace.addChangeListener((event) => {
if (
"blockId" in event &&
$workspace
.getBlockById(event.blockId as string)
?.type?.includes("procedures")
) {
($workspace as WorkspaceSvg).getToolbox().refreshSelection();
}
canUndo.set(get(workspace).getUndoStack().length > 0);
canRedo.set(get(workspace).getRedoStack().length > 0);
Expand Down

0 comments on commit 37520bb

Please sign in to comment.