Largely extending the existing NodeParamView with functionality from the previous release.
20 lines
409 B
C++
20 lines
409 B
C++
#include "nodeparamviewundo.h"
|
|
|
|
NodeParamSetKeyframing::NodeParamSetKeyframing(NodeInput *input, bool setting, QUndoCommand *parent) :
|
|
QUndoCommand(parent),
|
|
input_(input),
|
|
setting_(setting)
|
|
{
|
|
Q_ASSERT(setting != input_->is_keyframing());
|
|
}
|
|
|
|
void NodeParamSetKeyframing::redo()
|
|
{
|
|
input_->set_is_keyframing(setting_);
|
|
}
|
|
|
|
void NodeParamSetKeyframing::undo()
|
|
{
|
|
input_->set_is_keyframing(!setting_);
|
|
}
|