cache: improved code flow

This commit is contained in:
itsmattkc
2021-09-23 00:16:05 -07:00
parent e101f3f4fe
commit 0b205ece9c
8 changed files with 55 additions and 95 deletions
+4 -4
View File
@@ -136,7 +136,7 @@ void SequenceDialog::accept()
sequence_->SetVideoParams(video_params);
sequence_->SetAudioParams(audio_params);
sequence_->SetLabel(name_field_->text());
sequence_->SetAutoCacheEnabled(parameter_tab_->GetSelectedPreviewAutoCache());
sequence_->SetVideoAutoCacheEnabled(parameter_tab_->GetSelectedPreviewAutoCache());
}
QDialog::accept();
@@ -171,7 +171,7 @@ SequenceDialog::SequenceParamCommand::SequenceParamCommand(Sequence* s,
old_video_params_(s->GetVideoParams()),
old_audio_params_(s->GetAudioParams()),
old_name_(s->GetLabel()),
old_autocache_(s->GetAutoCacheEnabled())
old_autocache_(s->GetVideoAutoCacheEnabled())
{
}
@@ -189,7 +189,7 @@ void SequenceDialog::SequenceParamCommand::redo()
sequence_->SetAudioParams(new_audio_params_);
}
sequence_->SetLabel(new_name_);
sequence_->SetAutoCacheEnabled(new_autocache_);
sequence_->SetVideoAutoCacheEnabled(new_autocache_);
}
void SequenceDialog::SequenceParamCommand::undo()
@@ -201,7 +201,7 @@ void SequenceDialog::SequenceParamCommand::undo()
sequence_->SetAudioParams(old_audio_params_);
}
sequence_->SetLabel(old_name_);
sequence_->SetAutoCacheEnabled(old_autocache_);
sequence_->SetVideoAutoCacheEnabled(old_autocache_);
}
}