From 9bd34fe0ccf649e29422555b64a2e59ae5ef7ef1 Mon Sep 17 00:00:00 2001 From: tytan652 Date: Sun, 16 Oct 2022 13:04:24 +0200 Subject: [PATCH] UI: Fix theme if apply and cancel in settings Cancel after apply in settings will set the old theme. --- UI/window-basic-settings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index 611e29f5b..0c726f667 100644 --- a/UI/window-basic-settings.cpp +++ b/UI/window-basic-settings.cpp @@ -3053,9 +3053,11 @@ void OBSBasicSettings::SaveGeneralSettings() int themeIndex = ui->theme->currentIndex(); QString themeData = ui->theme->itemData(themeIndex).toString(); - if (WidgetChanged(ui->theme)) + if (WidgetChanged(ui->theme)) { + savedTheme = themeData.toStdString(); config_set_string(GetGlobalConfig(), "General", "CurrentTheme3", QT_TO_UTF8(themeData)); + } #if defined(_WIN32) || defined(__APPLE__) if (WidgetChanged(ui->enableAutoUpdates))