From cffdc15aacd63e1bc6d734c941e28761297cc827 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Sat, 18 May 2024 20:56:41 -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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 9ac1d2606fd139..eebc0c03bbc328 100644 --- a/UI/window-basic-main.cpp +++ b/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()