From b65411c343a66c34ee1b97a7728442e9f0467043 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Wed, 13 Jul 2022 17:49:27 +0200 Subject: [PATCH] UI: Fix color format warning bbeafeabdd1c00affa73657a0ac992dd9295fc15 change how the combobox is filled. `UpdateColorFormatSpaceWarning` did not get the required change to use the combobox data rather than the text. --- UI/window-basic-settings.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index a5cd4751d..4d309edab 100644 --- a/UI/window-basic-settings.cpp +++ b/UI/window-basic-settings.cpp @@ -2583,13 +2583,13 @@ void OBSBasicSettings::LoadAudioSettings() void OBSBasicSettings::UpdateColorFormatSpaceWarning() { - const QString text = ui->colorFormat->currentText(); + const QString format = ui->colorFormat->currentData().toString(); switch (ui->colorSpace->currentIndex()) { case 3: /* Rec.2100 (PQ) */ case 4: /* Rec.2100 (HLG) */ - if (text == "P010") { + if (format == "P010") { ui->advancedMsg2->clear(); - } else if (text == "I010") { + } else if (format == "I010") { ui->advancedMsg2->setText( QTStr("Basic.Settings.Advanced.FormatWarning")); } else { @@ -2598,9 +2598,9 @@ void OBSBasicSettings::UpdateColorFormatSpaceWarning() } break; default: - if (text == "NV12") { + if (format == "NV12") { ui->advancedMsg2->clear(); - } else if ((text == "I010") || (text == "P010")) { + } else if ((format == "I010") || (format == "P010")) { ui->advancedMsg2->setText(QTStr( "Basic.Settings.Advanced.FormatWarning10BitSdr")); } else {