Browse Source

UI: Bring stats to front if it already exists

If the menu item is triggered again, just bring it to the front instead
of trying to recreate it again.
jp9000 8 years ago
parent
commit
b3435f62d7
1 changed files with 6 additions and 1 deletions
  1. 6 1
      UI/window-basic-main.cpp

+ 6 - 1
UI/window-basic-main.cpp

@@ -5492,7 +5492,12 @@ void OBSBasic::on_autoConfigure_triggered()
 
 void OBSBasic::on_stats_triggered()
 {
-	stats.clear();
+	if (!stats.isNull()) {
+		stats->show();
+		stats->raise();
+		return;
+	}
+
 	OBSBasicStats *statsDlg;
 	statsDlg = new OBSBasicStats(nullptr);
 	statsDlg->setModal(false);