From 0123613e9185ad076e00c2b956793f9e32d41dfa Mon Sep 17 00:00:00 2001 From: Qv2ray-dev <59914293+Qv2ray-dev@users.noreply.github.com> Date: Sun, 17 May 2020 22:46:40 +0800 Subject: [PATCH] update: check instead of re-applying the same theme --- makespec/BUILDVERSION | 2 +- src/ui/windows/w_PreferencesWindow.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index 3777c1cb..4e8a6e6d 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -5463 +5464 diff --git a/src/ui/windows/w_PreferencesWindow.cpp b/src/ui/windows/w_PreferencesWindow.cpp index 1d4921cb..19bacfd5 100644 --- a/src/ui/windows/w_PreferencesWindow.cpp +++ b/src/ui/windows/w_PreferencesWindow.cpp @@ -308,7 +308,10 @@ void PreferencesWindow::on_buttonBox_accepted() { NEEDRESTART } - StyleManager->ApplyStyle(CurrentConfig.uiConfig.theme); + if (CurrentConfig.uiConfig.theme != GlobalConfig.uiConfig.theme) + { + StyleManager->ApplyStyle(CurrentConfig.uiConfig.theme); + } SaveGlobalSettings(CurrentConfig); UIMessageBus.EmitGlobalSignal(QvMBMessage::UPDATE_COLORSCHEME); if (NeedRestart)