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
+2 -1
View File
@@ -27,6 +27,7 @@
#include "node/node.h"
#include "nodeviewitem.h"
#include "undo/undocommand.h"
#include "widget/timelinewidget/undo/undo.h"
OLIVE_NAMESPACE_ENTER
@@ -112,7 +113,7 @@ private:
NodeGraph* graph_;
QList<Node*> nodes_;
QList<NodeEdgePtr> edges_;
QMap<Block*, QList<Block*>> linked_blocks_;
QList<BlockUnlinkAllCommand*> block_unlink_commands_;
};
class NodeRemoveWithExclusiveDeps : public UndoCommand {