Browse Source

UI: Fix extra browser panels always creating on startup

The extra browser panels would always create on startup due to the
visibility change.  This fixes that by ensuring that this call blocks
signals, and ensures that the call only happens on first creation by the
user and not when the user is loading on startup.
jp9000 6 years ago
parent
commit
3f28d44d00
1 changed files with 5 additions and 1 deletions
  1. 5 1
      UI/window-extra-browsers.cpp

+ 5 - 1
UI/window-extra-browsers.cpp

@@ -550,7 +550,11 @@ void OBSBasic::AddExtraBrowserDock(const QString &title, const QString &url,
 	}
 
 	QAction *action = AddDockWidget(dock);
-	action->setChecked(true);
+	if (firstCreate) {
+		action->blockSignals(true);
+		action->setChecked(true);
+		action->blockSignals(false);
+	}
 
 	extraBrowserDocks.push_back(QSharedPointer<QDockWidget>(dock));
 	extraBrowserDockActions.push_back(QSharedPointer<QAction>(action));