new undo system

Also enables undoing when working with node input arrays
This commit is contained in:
itsmattkc
2021-01-29 16:10:34 +11:00
parent 4e5db91c17
commit ad4b83a098
69 changed files with 1218 additions and 837 deletions
+7 -2
View File
@@ -45,14 +45,19 @@ NodeKeyframe::~NodeKeyframe()
setParent(nullptr);
}
NodeKeyframe *NodeKeyframe::copy(QObject* parent) const
NodeKeyframe *NodeKeyframe::copy(int element, QObject *parent) const
{
NodeKeyframe* copy = new NodeKeyframe(time_, value_, type_, track_, element_, parent);
NodeKeyframe* copy = new NodeKeyframe(time_, value_, type_, track_, element, parent);
copy->bezier_control_in_ = bezier_control_in_;
copy->bezier_control_out_ = bezier_control_out_;
return copy;
}
NodeKeyframe *NodeKeyframe::copy(QObject* parent) const
{
return copy(element_, parent);
}
NodeInput *NodeKeyframe::parent() const
{
return static_cast<NodeInput*>(QObject::parent());