blob: 4625d3e455cdb57cf558edf1b4ada683462c61be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 14921028c..4216e6237 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) {
|