Explorar el Código

UI: Fix Grid Mode not persisting from View Menu

When clicking Grid Mode or List Mode from the context menu within the
Scenes list, whether or not Grid Mode is enabled persists between OBS
sessions. When clicking Grid or List from the View Menu, the setting
does not persist between OBS sessions. This seems to be a regression
from fc8c42852173ed17729f343f8423901cc97ee351.

Previously, SceneTree's SetGridMode would set this config value. If the
intent is to not have SetGridMode directly set the config value, then
any function that calls SetGridMode other than the OBSBasic constructor
must instead set the config value.
Ryan Foster hace 1 año
padre
commit
cffdc15aac
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      UI/window-basic-main.cpp

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

@@ -5588,11 +5588,14 @@ void OBSBasic::on_scenes_customContextMenuRequested(const QPoint &pos)
 void OBSBasic::on_actionSceneListMode_triggered()
 {
 	ui->scenes->SetGridMode(false);
+	config_set_bool(App()->GlobalConfig(), "BasicWindow", "gridMode",
+			false);
 }
 
 void OBSBasic::on_actionSceneGridMode_triggered()
 {
 	ui->scenes->SetGridMode(true);
+	config_set_bool(App()->GlobalConfig(), "BasicWindow", "gridMode", true);
 }
 
 void OBSBasic::GridActionClicked()
@@ -9673,6 +9676,9 @@ void OBSBasic::on_resetUI_triggered()
 	ui->toggleStatusBar->setChecked(true);
 	ui->scenes->SetGridMode(false);
 	ui->actionSceneListMode->setChecked(true);
+
+	config_set_bool(App()->GlobalConfig(), "BasicWindow", "gridMode",
+			false);
 }
 
 void OBSBasic::on_multiviewProjectorWindowed_triggered()