Skip to content

Commit

Permalink
UI: Move saving of scene tree grid mode
Browse files Browse the repository at this point in the history
This now saves the grid mode in the grid mode toggle action in the
OBSBasic class.
  • Loading branch information
cg2121 authored and Lain-B committed May 20, 2023
1 parent 106c7aa commit 57e57f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions UI/scene-tree.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "obs.hpp"
#include "scene-tree.hpp"
#include "obs-app.hpp"

#include <QSizePolicy>
#include <QScrollBar>
Expand All @@ -17,7 +15,6 @@ SceneTree::SceneTree(QWidget *parent_) : QListWidget(parent_)

void SceneTree::SetGridMode(bool grid)
{
config_set_bool(App()->GlobalConfig(), "BasicWindow", "gridMode", grid);
parent()->setProperty("gridMode", grid);
gridMode = grid;

Expand Down
2 changes: 2 additions & 0 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5468,6 +5468,8 @@ void OBSBasic::GridActionClicked()
{
bool gridMode = !ui->scenes->GetGridMode();
ui->scenes->SetGridMode(gridMode);
config_set_bool(App()->GlobalConfig(), "BasicWindow", "gridMode",
gridMode);
}

void OBSBasic::on_actionAddScene_triggered()
Expand Down

0 comments on commit 57e57f6

Please sign in to comment.