Files
oak-editor/app/widget/keyframeview/keyframeviewundo.cpp
T
itsmattkc 3e3963dfaa implemented keyframe type changing
Implemented the UI to change a keyframe's type along with the ValueChanged
signals that should result.
2019-12-27 16:37:06 +11:00

20 lines
373 B
C++

#include "keyframeviewundo.h"
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_);
}