various fixes

This commit is contained in:
itsmattkc
2019-01-22 20:36:00 +11:00
parent d997bdb31d
commit d4d654203d
9 changed files with 71 additions and 88 deletions
+5 -3
View File
@@ -44,7 +44,7 @@ Clip::Clip(Sequence* s) :
reset();
}
Clip* Clip::copy(Sequence* s) {
Clip* Clip::copy(Sequence* s, bool duplicate_transitions) {
Clip* copy = new Clip(s);
copy->enabled = enabled;
@@ -69,8 +69,10 @@ Clip* Clip::copy(Sequence* s) {
copy->cached_fr = (this->sequence == nullptr) ? cached_fr : this->sequence->frame_rate;
if (get_opening_transition() != nullptr && get_opening_transition()->secondary_clip == nullptr) copy->opening_transition = get_opening_transition()->copy(copy, nullptr);
if (get_closing_transition() != nullptr && get_closing_transition()->secondary_clip == nullptr) copy->closing_transition = get_closing_transition()->copy(copy, nullptr);
if (duplicate_transitions) {
if (get_opening_transition() != nullptr && get_opening_transition()->secondary_clip == nullptr) copy->opening_transition = get_opening_transition()->copy(copy, nullptr);
if (get_closing_transition() != nullptr && get_closing_transition()->secondary_clip == nullptr) copy->closing_transition = get_closing_transition()->copy(copy, nullptr);
}
copy->recalculateMaxLength();
+1 -1
View File
@@ -35,7 +35,7 @@ struct Clip
{
Clip(Sequence* s);
~Clip();
Clip* copy(Sequence* s);
Clip* copy(Sequence* s, bool duplicate_transitions = true);
void reset_audio();
void reset();
void refresh();
+3 -3
View File
@@ -209,7 +209,7 @@ SetTimelineInOutCommand::SetTimelineInOutCommand(Sequence *s, bool enabled, long
void SetTimelineInOutCommand::undo() {
seq->using_workarea = old_enabled;
seq->enable_workarea = old_workarea_enabled;
seq->enable_workarea = old_workarea_enabled;
seq->workarea_in = old_in;
seq->workarea_out = old_out;
@@ -226,11 +226,11 @@ void SetTimelineInOutCommand::undo() {
void SetTimelineInOutCommand::redo() {
old_enabled = seq->using_workarea;
old_workarea_enabled = seq->enable_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;
if (!seq->using_workarea) seq->enable_workarea = true;
seq->using_workarea = new_enabled;
seq->workarea_in = new_in;
seq->workarea_out = new_out;
+1 -1
View File
@@ -174,7 +174,7 @@ public:
private:
Sequence* seq;
bool old_workarea_enabled;
bool old_workarea_enabled;
bool old_enabled;
long old_in;