restored setting to play past the end of the sequence
This commit is contained in:
@@ -256,6 +256,8 @@ void PreferencesDialog::accept() {
|
|||||||
olive::CurrentConfig.use_native_menu_styling = native_menus->isChecked();
|
olive::CurrentConfig.use_native_menu_styling = native_menus->isChecked();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
olive::CurrentConfig.auto_seek_to_beginning = auto_seek_to_beginning->isChecked();
|
||||||
|
|
||||||
// Check if the thumbnail or waveform icon
|
// Check if the thumbnail or waveform icon
|
||||||
if (olive::CurrentConfig.thumbnail_resolution != thumbnail_res_spinbox->value()
|
if (olive::CurrentConfig.thumbnail_resolution != thumbnail_res_spinbox->value()
|
||||||
|| olive::CurrentConfig.waveform_resolution != waveform_res_spinbox->value()) {
|
|| olive::CurrentConfig.waveform_resolution != waveform_res_spinbox->value()) {
|
||||||
@@ -560,6 +562,10 @@ void PreferencesDialog::setup_ui() {
|
|||||||
add_default_effects_to_clips->setChecked(olive::CurrentConfig.add_default_effects_to_clips);
|
add_default_effects_to_clips->setChecked(olive::CurrentConfig.add_default_effects_to_clips);
|
||||||
behavior_tab_layout->addWidget(add_default_effects_to_clips);
|
behavior_tab_layout->addWidget(add_default_effects_to_clips);
|
||||||
|
|
||||||
|
auto_seek_to_beginning = new QCheckBox(tr("Automatically Seek to the Beginning When Playing at the End of a Sequence"));
|
||||||
|
auto_seek_to_beginning->setChecked(olive::CurrentConfig.auto_seek_to_beginning);
|
||||||
|
behavior_tab_layout->addWidget(auto_seek_to_beginning);
|
||||||
|
|
||||||
// Appearance
|
// Appearance
|
||||||
QWidget* appearance_tab = new QWidget(this);
|
QWidget* appearance_tab = new QWidget(this);
|
||||||
tabWidget->addTab(appearance_tab, tr("Appearance"));
|
tabWidget->addTab(appearance_tab, tr("Appearance"));
|
||||||
|
|||||||
@@ -248,6 +248,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
QCheckBox* add_default_effects_to_clips;
|
QCheckBox* add_default_effects_to_clips;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief UI widget for enabling/disabling Config::auto_seek_to_beginning
|
||||||
|
*/
|
||||||
|
QCheckBox* auto_seek_to_beginning;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief UI widget for selecting the current UI style
|
* @brief UI widget for selecting the current UI style
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ Config::Config()
|
|||||||
upcoming_queue_type(olive::FRAME_QUEUE_TYPE_SECONDS),
|
upcoming_queue_type(olive::FRAME_QUEUE_TYPE_SECONDS),
|
||||||
loop(false),
|
loop(false),
|
||||||
seek_also_selects(false),
|
seek_also_selects(false),
|
||||||
|
auto_seek_to_beginning(true),
|
||||||
effect_textbox_lines(3),
|
effect_textbox_lines(3),
|
||||||
use_software_fallback(false),
|
use_software_fallback(false),
|
||||||
center_timeline_timecodes(true),
|
center_timeline_timecodes(true),
|
||||||
@@ -179,6 +180,9 @@ void Config::load(QString path) {
|
|||||||
} else if (stream.name() == "SeekAlsoSelects") {
|
} else if (stream.name() == "SeekAlsoSelects") {
|
||||||
stream.readNext();
|
stream.readNext();
|
||||||
seek_also_selects = (stream.text() == "1");
|
seek_also_selects = (stream.text() == "1");
|
||||||
|
} else if (stream.name() == "AutoSeekToBeginning") {
|
||||||
|
stream.readNext();
|
||||||
|
auto_seek_to_beginning = (stream.text() == "1");
|
||||||
} else if (stream.name() == "CSSPath") {
|
} else if (stream.name() == "CSSPath") {
|
||||||
stream.readNext();
|
stream.readNext();
|
||||||
css_path = stream.text().toString();
|
css_path = stream.text().toString();
|
||||||
@@ -271,6 +275,7 @@ void Config::save(QString path) {
|
|||||||
stream.writeTextElement("UpcomingFrameQueueType", QString::number(upcoming_queue_type));
|
stream.writeTextElement("UpcomingFrameQueueType", QString::number(upcoming_queue_type));
|
||||||
stream.writeTextElement("Loop", QString::number(loop));
|
stream.writeTextElement("Loop", QString::number(loop));
|
||||||
stream.writeTextElement("SeekAlsoSelects", QString::number(seek_also_selects));
|
stream.writeTextElement("SeekAlsoSelects", QString::number(seek_also_selects));
|
||||||
|
stream.writeTextElement("AutoSeekToBeginning", QString::number(auto_seek_to_beginning));
|
||||||
stream.writeTextElement("CSSPath", css_path);
|
stream.writeTextElement("CSSPath", css_path);
|
||||||
stream.writeTextElement("EffectTextboxLines", QString::number(effect_textbox_lines));
|
stream.writeTextElement("EffectTextboxLines", QString::number(effect_textbox_lines));
|
||||||
stream.writeTextElement("UseSoftwareFallback", QString::number(use_software_fallback));
|
stream.writeTextElement("UseSoftwareFallback", QString::number(use_software_fallback));
|
||||||
|
|||||||
@@ -413,6 +413,13 @@ struct Config {
|
|||||||
*/
|
*/
|
||||||
bool seek_also_selects;
|
bool seek_also_selects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Automatically seek to the beginning of a sequence if the user plays beyond the end of it
|
||||||
|
*
|
||||||
|
* TRUE if this behavior should be enabled.
|
||||||
|
*/
|
||||||
|
bool auto_seek_to_beginning;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CSS Path
|
* @brief CSS Path
|
||||||
*
|
*
|
||||||
|
|||||||
+3
-2
@@ -402,7 +402,7 @@ void Viewer::play(bool in_to_out) {
|
|||||||
if (!is_recording_cued()
|
if (!is_recording_cued()
|
||||||
&& playback_speed >= 0
|
&& playback_speed >= 0
|
||||||
&& (playing_in_to_out
|
&& (playing_in_to_out
|
||||||
|| seq->playhead >= sequence_end_frame
|
|| (olive::CurrentConfig.auto_seek_to_beginning && seq->playhead >= sequence_end_frame)
|
||||||
|| (seek_to_in && seq->playhead >= seq->workarea_out))) {
|
|| (seek_to_in && seq->playhead >= seq->workarea_out))) {
|
||||||
seek(seek_to_in ? seq->workarea_in : 0);
|
seek(seek_to_in ? seq->workarea_in : 0);
|
||||||
}
|
}
|
||||||
@@ -890,7 +890,8 @@ void Viewer::timer_update() {
|
|||||||
pause();
|
pause();
|
||||||
}
|
}
|
||||||
} else if (playback_speed > 0) {
|
} else if (playback_speed > 0) {
|
||||||
if (seq->playhead >= seq->getEndFrame()) {
|
long end_frame = seq->getEndFrame();
|
||||||
|
if ((olive::CurrentConfig.auto_seek_to_beginning || previous_playhead < end_frame) && seq->playhead >= end_frame) {
|
||||||
pause();
|
pause();
|
||||||
}
|
}
|
||||||
if (seq->using_workarea && seq->playhead >= seq->workarea_out) {
|
if (seq->using_workarea && seq->playhead >= seq->workarea_out) {
|
||||||
|
|||||||
Reference in New Issue
Block a user