fixed window frame for minimized and maximized windows on startup

This commit is contained in:
fourtf 2019-08-26 22:32:17 +02:00
parent 4dc4a37360
commit 810acbcfcc

View file

@ -298,15 +298,6 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
Window &window = createWindow(type, false); 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) if (type == WindowType::Main)
{ {
mainWindow_ = &window; mainWindow_ = &window;
@ -403,6 +394,15 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
} }
} }
window.show(); 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) if (mainWindow_ == nullptr)