Also show when minimize on startup is enabled, but not minimize to tray

This commit is contained in:
Janek Bevendorff 2017-02-14 19:08:14 +01:00
parent b73549fd35
commit fed210dc38

View File

@ -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();
}