Set file format combo box unconditionally (#8237)

This commit is contained in:
Sotonye Atemie
2026-01-31 17:39:34 -05:00
committed by GitHub
parent 13ea2ee480
commit e076446fd3

View File

@@ -186,14 +186,10 @@ ExportProjectDialog::ExportProjectDialog(const QString& path, Mode mode, QWidget
connect(m_fileFormatComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this,
&ExportProjectDialog::onFileFormatChanged);
if (mode == Mode::ExportProject)
{
const auto pathExtension = QFileInfo{path}.completeSuffix().prepend(".");
const auto pathFormat = ProjectRenderer::getFileFormatFromExtension(pathExtension);
m_fileFormatComboBox->setCurrentIndex(
std::max(0, m_fileFormatComboBox->findData(static_cast<int>(pathFormat))));
}
const auto pathExtension = QFileInfo{path}.completeSuffix().prepend(".");
const auto pathFormat = ProjectRenderer::getFileFormatFromExtension(pathExtension);
m_fileFormatComboBox->setCurrentIndex(std::max(0, m_fileFormatComboBox->findData(static_cast<int>(pathFormat))));
m_bitRateComboBox->setCurrentIndex(std::max(0, m_bitRateComboBox->findData(defaultBitRate)));
m_bitDepthComboBox->setCurrentIndex(std::max(0, m_bitDepthComboBox->findData(static_cast<int>(defaultBitDepth))));
m_stereoModeComboBox->setCurrentIndex(