From 28e1bdb80c67da6196751f19d8a021cbf0b542dd Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Sat, 18 May 2024 20:05:24 -0400 Subject: [PATCH] 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. --- UI/window-basic-main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 591a91e48b5e0d..e399ca6035fd1f 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -5591,11 +5591,15 @@ 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() @@ -9676,6 +9680,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()