Browse Source

UI: Immediately apply tray icon change on Apply

Rather than waiting until the user chooses OK or Cancel to update the
system tray icon status, update it when the user chooses Apply.
Cody Jung 4 years ago
parent
commit
8929798d4d
2 changed files with 4 additions and 3 deletions
  1. 0 2
      UI/window-basic-main.cpp
  2. 4 1
      UI/window-basic-settings.cpp

+ 0 - 2
UI/window-basic-main.cpp

@@ -4768,8 +4768,6 @@ void OBSBasic::on_action_Settings_triggered()
 		settings.exec();
 	}
 
-	SystemTray(false);
-
 	settings_already_executing = false;
 
 	if (restart) {

+ 4 - 1
UI/window-basic-settings.cpp

@@ -3151,11 +3151,14 @@ void OBSBasicSettings::SaveGeneralSettings()
 				"KeepReplayBufferStreamStops",
 				ui->keepReplayStreamStops->isChecked());
 
-	if (WidgetChanged(ui->systemTrayEnabled))
+	if (WidgetChanged(ui->systemTrayEnabled)) {
 		config_set_bool(GetGlobalConfig(), "BasicWindow",
 				"SysTrayEnabled",
 				ui->systemTrayEnabled->isChecked());
 
+		main->SystemTray(false);
+	}
+
 	if (WidgetChanged(ui->systemTrayWhenStarted))
 		config_set_bool(GetGlobalConfig(), "BasicWindow",
 				"SysTrayWhenStarted",