implemented keyframe type changing

Implemented the UI to change a keyframe's type along with the ValueChanged
signals that should result.
This commit is contained in:
itsmattkc
2019-12-27 16:37:06 +11:00
parent 855fe5e93f
commit 3e3963dfaa
11 changed files with 171 additions and 7 deletions
+14 -1
View File
@@ -1,6 +1,19 @@
#include "keyframeviewundo.h"
KeyframeViewUndo::KeyframeViewUndo()
KeyframeSetTypeCommand::KeyframeSetTypeCommand(NodeKeyframePtr key, NodeKeyframe::Type type, QUndoCommand *parent) :
QUndoCommand(parent),
key_(key),
old_type_(key->type()),
new_type_(type)
{
}
void KeyframeSetTypeCommand::redo()
{
key_->set_type(new_type_);
}
void KeyframeSetTypeCommand::undo()
{
key_->set_type(old_type_);
}