Browse Source

UI: Fix browser docks being unchecked when created

In the view -> Docks menu, when a user first creates a custom browser
dock, the menu item associated with them used to hide/show them will be
unchecked in the menu by mistake.  This ensures they're checked when
first created.
jp9000 6 years ago
parent
commit
5d19786e04
1 changed files with 4 additions and 2 deletions
  1. 4 2
      UI/window-extra-browsers.cpp

+ 4 - 2
UI/window-extra-browsers.cpp

@@ -549,8 +549,10 @@ void OBSBasic::AddExtraBrowserDock(const QString &title, const QString &url,
 		dock->setVisible(true);
 	}
 
+	QAction *action = AddDockWidget(dock);
+	action->setChecked(true);
+
 	extraBrowserDocks.push_back(QSharedPointer<QDockWidget>(dock));
-	extraBrowserDockActions.push_back(
-		QSharedPointer<QAction>(AddDockWidget(dock)));
+	extraBrowserDockActions.push_back(QSharedPointer<QAction>(action));
 	extraBrowserDockTargets.push_back(url);
 }