Only ignore closeEvent when minimizing to system tray

Fixes #277
This commit is contained in:
Jonas Kvinge 2019-10-19 02:21:20 +02:00
parent abeb580228
commit 5844616ea8
1 changed files with 2 additions and 1 deletions

View File

@ -1330,12 +1330,12 @@ void MainWindow::closeEvent(QCloseEvent *event) {
settings.endGroup();
if (keep_running && event->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable()) {
event->ignore();
SetHiddenInTray(true);
}
else {
Exit();
}
event->ignore();
}
@ -1352,6 +1352,7 @@ void MainWindow::SetHiddenInTray(bool hidden) {
if (was_maximized_) showMaximized();
else show();
}
}
void MainWindow::FilePathChanged(const QString &path) {