From 7aedf7833859047dfd9a4ad85bd4da11b896c817 Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Sun, 9 May 2021 20:14:18 -0500 Subject: [PATCH] UI: Simplify log viewer on launch code Removes redundant code when showing log viewer on start up. --- UI/window-basic-main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 6c6d93fdd..53d4a4ac4 100644 --- a/UI/window-basic-main.cpp +++ b/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)