Merge pull request #2228 from jpark37/qt-redundant-theme

UI: Don't modify theme if already set
This commit is contained in:
Jim 2019-12-07 12:07:31 -08:00 committed by GitHub
commit 06f14edf08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3509,7 +3509,8 @@ void OBSBasicSettings::on_theme_activated(int idx)
if (currT == defaultTheme)
currT = DEFAULT_THEME;
App()->SetTheme(currT.toUtf8().constData());
if (currT != App()->GetTheme())
App()->SetTheme(currT.toUtf8().constData());
}
void OBSBasicSettings::on_listWidget_itemSelectionChanged()
@ -3535,7 +3536,8 @@ void OBSBasicSettings::on_buttonBox_clicked(QAbstractButton *button)
if (val == QDialogButtonBox::AcceptRole ||
val == QDialogButtonBox::RejectRole) {
if (val == QDialogButtonBox::RejectRole) {
App()->SetTheme(savedTheme);
if (savedTheme != App()->GetTheme())
App()->SetTheme(savedTheme);
#ifdef _WIN32
if (toggleAero)
SetAeroEnabled(!aeroWasDisabled);