Skip to content

Commit

Permalink
fix: Undo/Redo while duplicating a block
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 committed Dec 18, 2024
1 parent 73bf5c4 commit 93556ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions frontend/src/components/BlockLayers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ const blockExitsInTree = (block: Block) => {
};
const selectBlock = (block: Block, event: MouseEvent) => {
const pauseId = store.activeCanvas?.history?.pause();
store.selectBlock(block, event, false, true);
pauseId && store.activeCanvas?.history?.resume(pauseId);
};
defineExpose({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ class Block implements BlockOptions {
nextTick(() => {
if (child) {
child.selectBlock();
pauseId && store.activeCanvas?.history?.resume(pauseId, true);
}
});
pauseId && store.activeCanvas?.history?.resume(pauseId, true);
}
getPadding() {
const padding = this.getStyle("padding") || "0px";
Expand Down

0 comments on commit 93556ad

Please sign in to comment.