Skip to content

Commit

Permalink
⚡ Fixing broken bulk delete
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Dec 9, 2022
1 parent 6ae8f07 commit a159929
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/editor-ui/src/views/NodeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ export default mixins(
});
this.historyStore.startRecordingUndo();
nodesToDelete.forEach((nodeName: string) => {
this.removeNode(nodeName, true);
this.removeNode(nodeName, true, true);
});
setTimeout(() => {
this.historyStore.stopRecordingUndo();
Expand Down Expand Up @@ -2610,7 +2610,7 @@ export default mixins(
});
});
},
removeNode(nodeName: string, trackHistory = false) {
removeNode(nodeName: string, trackHistory = false, partOfBulkDelete = false) {
if (!this.editAllowedCheck()) {
return;
}
Expand All @@ -2620,7 +2620,7 @@ export default mixins(
return;
}
if (trackHistory) {
if (trackHistory && !partOfBulkDelete) {
this.historyStore.startRecordingUndo();
}
Expand Down Expand Up @@ -2715,7 +2715,7 @@ export default mixins(
this.historyStore.pushCommandToUndo(new RemoveNodeCommand(node, this));
}
}, 0); // allow other events to finish like drag stop
if (trackHistory) {
if (trackHistory && !partOfBulkDelete) {
const recordingTimeout = waitForNewConnection ? 100 : 0;
setTimeout(() => {
this.historyStore.stopRecordingUndo();
Expand Down

0 comments on commit a159929

Please sign in to comment.