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:
+1
-4
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user