Replace custom unlink with BlockUnlinkAllCommand

Re-use existing unlink command and move all the unlinking code to
NodeRemoveCommand to cover all bases (deletion of a block in the
timeline or in the node editor).
This commit is contained in:
Thomas Wilshaw
2020-09-30 18:14:11 +01:00
parent e09afd7f68
commit 9d27d557cd
4 changed files with 12 additions and 19 deletions
@@ -494,8 +494,6 @@ void TimelineWidget::ReplaceBlocksWithGaps(const QList<Block *> &blocks,
new TrackReplaceBlockWithGapCommand(original_track, b, command);
if (remove_from_graph) {
new BlockUnlinkAllCommand(b, command);
new NodeRemoveWithExclusiveDeps(static_cast<NodeGraph*>(b->parent()), b, command);
}
}