update: check instead of re-applying the same theme

This commit is contained in:
Qv2ray-dev 2020-05-17 22:46:40 +08:00
parent 0aad012576
commit 0123613e91
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
5463
5464

View File

@ -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)