Browse Source

UI: Make sure aero resets if settings cancelled

Fixes a bug where pressing "Cancel" on the settings window would not
reset aero to its original state.
jp9000 10 years ago
parent
commit
3f9578dc33
1 changed files with 6 additions and 1 deletions
  1. 6 1
      obs/window-basic-settings.cpp

+ 6 - 1
obs/window-basic-settings.cpp

@@ -2296,8 +2296,13 @@ void OBSBasicSettings::on_buttonBox_clicked(QAbstractButton *button)
 
 	if (val == QDialogButtonBox::AcceptRole ||
 	    val == QDialogButtonBox::RejectRole) {
-		if (val == QDialogButtonBox::RejectRole)
+		if (val == QDialogButtonBox::RejectRole) {
 			App()->SetTheme(savedTheme);
+#ifdef _WIN32
+			if (toggleAero)
+				SetAeroEnabled(!aeroWasDisabled);
+#endif
+		}
 		ClearChanged();
 		close();
 	}