Last active
July 21, 2020 06:29
-
-
Save Korvox/c8db324ebf25b4508b80c4d5f52e15a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp | |
index 14921028c..be8b13be7 100644 | |
--- a/src/ui/mainwindow.cpp | |
+++ b/src/ui/mainwindow.cpp | |
@@ -1444,17 +1444,9 @@ void MainWindow::StopAfterCurrent() { | |
} | |
void MainWindow::closeEvent(QCloseEvent* event) { | |
- bool keep_running(false); | |
- if (tray_icon_) | |
- keep_running = | |
- settings_.value("keeprunning", tray_icon_->IsVisible()).toBool(); | |
- | |
- if (keep_running && event->spontaneous()) { | |
- event->ignore(); | |
- SetHiddenInTray(true); | |
- } else { | |
- Exit(); | |
- } | |
+ if (!tray_icon_ || !tray_icon_->IsVisible()) | |
+ Exit(); | |
+ QMainWindow::closeEvent(event); | |
} | |
void MainWindow::SetHiddenInTray(bool hidden) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment