Browse Source

UI: Simplify log viewer on launch code

Removes redundant code when showing log viewer on start up.
Clayton Groeneveld 4 years ago
parent
commit
7aedf78338
1 changed files with 2 additions and 5 deletions
  1. 2 5
      UI/window-basic-main.cpp

+ 2 - 5
UI/window-basic-main.cpp

@@ -2068,11 +2068,8 @@ void OBSBasic::OnFirstLoad()
 	bool showLogViewerOnStartup = config_get_bool(
 		App()->GlobalConfig(), "LogViewer", "ShowLogStartup");
 
-	if (showLogViewerOnStartup) {
-		if (!logView)
-			logView = new OBSLogViewer();
-		logView->show();
-	}
+	if (showLogViewerOnStartup)
+		on_actionViewCurrentLog_triggered();
 }
 
 void OBSBasic::DeferredSysTrayLoad(int requeueCount)