From a175a158bb43c24b3678012879a70749e5f3be7e Mon Sep 17 00:00:00 2001 From: Exeldro Date: Mon, 29 Jul 2024 13:01:10 +0200 Subject: [PATCH] Fix video encoder index visible at start --- config-dialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config-dialog.cpp b/config-dialog.cpp index 3c170a4..8fd8200 100644 --- a/config-dialog.cpp +++ b/config-dialog.cpp @@ -540,7 +540,11 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting }); videoPageLayout->addRow(QString::fromUtf8(obs_module_text("VideoEncoderIndex")), videoEncoderIndex); - auto videoEncoderGroup = new QGroupBox(QString::fromUtf8(obs_module_text("VideoEncoder"))); + if (videoEncoderIndex->currentIndex() != 0 || + !config_get_bool(obs_frontend_get_profile_config(), "Stream1", "EnableMultitrackVideo")) + videoPageLayout->setRowVisible(videoEncoderIndex, false); + + auto videoEncoderGroup = new QWidget(); videoEncoderGroup->setProperty("altColor", QVariant(true)); auto videoEncoderGroupLayout = new QFormLayout(); videoEncoderGroup->setLayout(videoEncoderGroupLayout); @@ -731,7 +735,7 @@ void OBSBasicSettings::AddServer(QFormLayout *outputsLayout, obs_data_t *setting }); audioPageLayout->addRow(QString::fromUtf8(obs_module_text("AudioEncoderIndex")), audioEncoderIndex); - auto audioEncoderGroup = new QGroupBox(QString::fromUtf8(obs_module_text("AudioEncoder"))); + auto audioEncoderGroup = new QWidget(); audioEncoderGroup->setProperty("altColor", QVariant(true)); auto audioEncoderGroupLayout = new QFormLayout(); audioEncoderGroup->setLayout(audioEncoderGroupLayout);