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
-4
View File
@@ -243,10 +243,6 @@ void TrackRippleRemoveAreaCommand::redo_internal()
foreach (Block* remove_block, removed_blocks_) {
track_->RippleRemoveBlock(remove_block);
BlockUnlinkAllCommand* unlink_command = new BlockUnlinkAllCommand(remove_block);
unlink_command->redo();
remove_block_commands_.append(unlink_command);
NodeRemoveWithExclusiveDeps* remove_command = new NodeRemoveWithExclusiveDeps(static_cast<NodeGraph*>(remove_block->parent()), remove_block);
remove_command->redo();
remove_block_commands_.append(remove_command);