From 42bbca3d4ba2330c8c3a905c153d39a090403757 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 12 May 2020 10:10:58 -0700 Subject: [PATCH] UI: Restore theme if settings window exit with [x] Fixes a bug where if the theme was changed, then wasn't saved, and the user exits the window with the [x] button, then chooses "No" when asked to save settings, it would not restore the original theme. --- UI/window-basic-settings.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index 7b268f34e..94a4bfc6d 100644 --- a/UI/window-basic-settings.cpp +++ b/UI/window-basic-settings.cpp @@ -3560,6 +3560,9 @@ bool OBSBasicSettings::QueryChanges() } else if (button == QMessageBox::Yes) { SaveSettings(); } else { + if (savedTheme != App()->GetTheme()) + App()->SetTheme(savedTheme); + LoadSettings(true); #ifdef _WIN32 if (toggleAero)