made timeline in/out toggleable

This commit is contained in:
itsmattkc
2019-01-11 01:33:02 +11:00
parent 0b0aaa3218
commit 1a0464179d
13 changed files with 40 additions and 13 deletions
+1
View File
@@ -8,6 +8,7 @@
Sequence::Sequence() :
playhead(0),
using_workarea(false),
enable_workarea(true),
workarea_in(0),
workarea_out(0),
wrapper_sequence(false)
+1
View File
@@ -28,6 +28,7 @@ struct Sequence {
long playhead;
bool using_workarea;
bool enable_workarea;
long workarea_in;
long workarea_out;
+3
View File
@@ -209,6 +209,7 @@ SetTimelineInOutCommand::SetTimelineInOutCommand(Sequence *s, bool enabled, long
void SetTimelineInOutCommand::undo() {
seq->using_workarea = old_enabled;
seq->enable_workarea = old_workarea_enabled;
seq->workarea_in = old_in;
seq->workarea_out = old_out;
@@ -225,9 +226,11 @@ void SetTimelineInOutCommand::undo() {
void SetTimelineInOutCommand::redo() {
old_enabled = seq->using_workarea;
old_workarea_enabled = seq->enable_workarea;
old_in = seq->workarea_in;
old_out = seq->workarea_out;
if (!seq->using_workarea) seq->enable_workarea = true;
seq->using_workarea = new_enabled;
seq->workarea_in = new_in;
seq->workarea_out = new_out;
+2
View File
@@ -174,6 +174,8 @@ public:
private:
Sequence* seq;
bool old_workarea_enabled;
bool old_enabled;
long old_in;
long old_out;