From fed210dc3803f89d8ebba0d5983a6ba9460d9281 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Tue, 14 Feb 2017 19:08:14 +0100 Subject: [PATCH] Also show when minimize on startup is enabled, but not minimize to tray --- src/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c3316ee5a..a9ab4c4aa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,9 +101,12 @@ int main(int argc, char** argv) QObject::connect(&app, SIGNAL(openFile(QString)), &mainWindow, SLOT(openDatabase(QString))); // start minimized if configured - if (config()->get("GUI/MinimizeOnStartup").toBool()) { + bool minimizeOnStartup = config()->get("GUI/MinimizeOnStartup").toBool(); + bool minimizeToTray = config()->get("GUI/MinimizeToTray").toBool(); + if (minimizeOnStartup) { mainWindow.setWindowState(Qt::WindowMinimized); - } else { + } + if (!(minimizeOnStartup && minimizeToTray)) { mainWindow.show(); }