diff --git a/app/config/config.cpp b/app/config/config.cpp index d2cb089db..43668c467 100644 --- a/app/config/config.cpp +++ b/app/config/config.cpp @@ -102,6 +102,7 @@ void Config::SetDefaults() SetEntryInternal(QStringLiteral("StopPlaybackOnLastFrame"), NodeValue::kBoolean, false); SetEntryInternal(QStringLiteral("UseLegacyColorInInputTab"), NodeValue::kBoolean, false); SetEntryInternal(QStringLiteral("ReassocLinToNonLin"), NodeValue::kBoolean, false); + SetEntryInternal(QStringLiteral("PreviewNonFloatDontAskAgain"), NodeValue::kBoolean, false); SetEntryInternal(QStringLiteral("AutoCacheDelay"), NodeValue::kInt, 1000); diff --git a/app/dialog/sequence/sequence.cpp b/app/dialog/sequence/sequence.cpp index 5e8d08e8e..28f8f98e6 100644 --- a/app/dialog/sequence/sequence.cpp +++ b/app/dialog/sequence/sequence.cpp @@ -106,6 +106,29 @@ void SequenceDialog::accept() return; } + if (!VideoParams::FormatIsFloat(parameter_tab_->GetSelectedPreviewFormat()) + && !OLIVE_CONFIG("PreviewNonFloatDontAskAgain").toBool()) { + QMessageBox b(this); + QCheckBox *dont_show_again_ = new QCheckBox(tr("Don't ask me again")); + + b.setIcon(QMessageBox::Warning); + b.setWindowTitle(tr("Low Quality Preview")); + b.setText(tr("The preview resolution has been set to a non-float format. This may cause banding and clipping artifacts in the preview.\n\n" + "Do you wish to continue?")); + b.setCheckBox(dont_show_again_); + + b.addButton(QMessageBox::Yes); + b.addButton(QMessageBox::No); + + if (b.exec() == QMessageBox::No) { + return; + } + + if (dont_show_again_->isChecked()) { + OLIVE_CONFIG("PreviewNonFloatDontAskAgain") = true; + } + } + // Generate video and audio parameter structs from data VideoParams video_params = VideoParams(parameter_tab_->GetSelectedVideoWidth(), parameter_tab_->GetSelectedVideoHeight(), diff --git a/app/dialog/sequence/sequencedialogparametertab.cpp b/app/dialog/sequence/sequencedialogparametertab.cpp index 73eff0f1e..364d34315 100644 --- a/app/dialog/sequence/sequencedialogparametertab.cpp +++ b/app/dialog/sequence/sequencedialogparametertab.cpp @@ -71,7 +71,7 @@ SequenceDialogParameterTab::SequenceDialogParameterTab(Sequence* sequence, QWidg preview_layout->addWidget(preview_resolution_label_, row, 2); row++; preview_layout->addWidget(new QLabel(tr("Quality:")), row, 0); - preview_format_field_ = new PixelFormatComboBox(true); + preview_format_field_ = new PixelFormatComboBox(false); preview_layout->addWidget(preview_format_field_, row, 1, 1, 2); row++; preview_layout->addWidget(new QLabel(tr("Auto-Cache:")), row, 0);