diff ui/mainwindow.cpp @ 690:e4abb41484a0

(issue 27)Only close if no new list is available
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 01 Jul 2014 15:40:30 +0200
parents 6df31cb47d54
children 315103410002
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Tue Jul 01 14:37:45 2014 +0200
+++ b/ui/mainwindow.cpp	Tue Jul 01 15:40:30 2014 +0200
@@ -1134,3 +1134,13 @@
         mUpdatesWidget->resize(old.width(), old.height() - mUpdatesManual->height());
     }
 }
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+    if (getState() == NewListAvailable) {
+        /* Only minimize to tray if there is a new list */
+        QMainWindow::closeEvent(event);
+        return;
+    }
+    return closeApp();
+}

http://wald.intevation.org/projects/trustbridge/