nodeparamview: implement copy/pasting values
This commit is contained in:
@@ -27,9 +27,8 @@ namespace olive {
|
||||
|
||||
NodeParamSetKeyframingCommand::NodeParamSetKeyframingCommand(const NodeInput &input, bool setting) :
|
||||
input_(input),
|
||||
setting_(setting)
|
||||
new_setting_(setting)
|
||||
{
|
||||
Q_ASSERT(setting != input_.IsKeyframing());
|
||||
}
|
||||
|
||||
Project *NodeParamSetKeyframingCommand::GetRelevantProject() const
|
||||
@@ -39,12 +38,13 @@ Project *NodeParamSetKeyframingCommand::GetRelevantProject() const
|
||||
|
||||
void NodeParamSetKeyframingCommand::redo()
|
||||
{
|
||||
input_.node()->SetInputIsKeyframing(input_, setting_);
|
||||
old_setting_ = input_.IsKeyframing();
|
||||
input_.node()->SetInputIsKeyframing(input_, new_setting_);
|
||||
}
|
||||
|
||||
void NodeParamSetKeyframingCommand::undo()
|
||||
{
|
||||
input_.node()->SetInputIsKeyframing(input_, !setting_);
|
||||
input_.node()->SetInputIsKeyframing(input_, old_setting_);
|
||||
}
|
||||
|
||||
NodeParamSetKeyframeValueCommand::NodeParamSetKeyframeValueCommand(NodeKeyframe* key, const QVariant& value) :
|
||||
|
||||
Reference in New Issue
Block a user