From 810acbcfcc4b99d9ef2582958f75c28cff6da837 Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 26 Aug 2019 22:32:17 +0200 Subject: [PATCH] fixed window frame for minimized and maximized windows on startup --- src/singletons/WindowManager.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index 5fb1fe6bd..99bb6bb3e 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -298,15 +298,6 @@ void WindowManager::initialize(Settings &settings, Paths &paths) Window &window = createWindow(type, false); - if (window_obj.value("state") == "maximized") - { - window.setWindowState(Qt::WindowMaximized); - } - else if (window_obj.value("state") == "minimized") - { - window.setWindowState(Qt::WindowMinimized); - } - if (type == WindowType::Main) { mainWindow_ = &window; @@ -403,6 +394,15 @@ void WindowManager::initialize(Settings &settings, Paths &paths) } } window.show(); + + if (window_obj.value("state") == "minimized") + { + window.setWindowState(Qt::WindowMinimized); + } + else if (window_obj.value("state") == "maximized") + { + window.setWindowState(Qt::WindowMaximized); + } } if (mainWindow_ == nullptr)