moved timeline undoable commands to using the new NodeAddCommand

Previous iteration used some "magic code" that added clips automatically to the
timeline. This was functional but ultimately outside of the undo commands'
control meaning nodes could be infinitely added and abandoned. This makes the
add process part of the undo command which means it's all undoable as the user
would expect.
This commit is contained in:
itsmattkc
2019-12-14 00:04:57 +11:00
parent 18bf126574
commit 323718bc11
21 changed files with 120 additions and 114 deletions
+1 -4
View File
@@ -116,10 +116,7 @@ NodeEdgePtr NodeParam::ConnectEdge(NodeOutput *output, NodeInput *input, bool lo
}
// Ensure both nodes are in the same graph
if (output->parentNode()->parent() != input->parentNode()->parent()) {
qWarning() << "Tried to connect two nodes that aren't part of the same graph";
return nullptr;
}
Q_ASSERT(output->parentNode()->parent() == input->parentNode()->parent());
NodeEdgePtr edge = std::make_shared<NodeEdge>(output, input);