Skip to content

Commit

Permalink
UI: Fix Grid Mode not persisting from View Menu
Browse files Browse the repository at this point in the history
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 fc8c428.

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.
  • Loading branch information
RytoEX committed May 19, 2024
1 parent adf744e commit e5caee6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5591,11 +5591,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()
Expand Down Expand Up @@ -9676,6 +9679,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()
Expand Down

0 comments on commit e5caee6

Please sign in to comment.