fixed disabling keyframe bug
This commit is contained in:
@@ -68,6 +68,7 @@ void EffectRow::set_keyframe_enabled(bool enabled) {
|
||||
ca->append(new KeyframeDelete(f, 0));
|
||||
}
|
||||
}
|
||||
ca->append(new SetKeyframing(this, false));
|
||||
undo_stack.push(ca);
|
||||
panel_effect_controls->update_keyframes();
|
||||
} else {
|
||||
|
||||
@@ -1291,3 +1291,16 @@ void KeyframeFieldSet::redo() {
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
||||
SetKeyframing::SetKeyframing(EffectRow *irow, bool ib) :
|
||||
row(irow),
|
||||
b(ib)
|
||||
{}
|
||||
|
||||
void SetKeyframing::undo() {
|
||||
row->setKeyframing(!b);
|
||||
}
|
||||
|
||||
void SetKeyframing::redo() {
|
||||
row->setKeyframing(b);
|
||||
}
|
||||
|
||||
@@ -641,4 +641,14 @@ private:
|
||||
QVariant new_val;
|
||||
};
|
||||
|
||||
class SetKeyframing : public QUndoCommand {
|
||||
public:
|
||||
SetKeyframing(EffectRow* irow, bool ib);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
EffectRow* row;
|
||||
bool b;
|
||||
};
|
||||
|
||||
#endif // UNDO_H
|
||||
|
||||
Reference in New Issue
Block a user