changeset 1232:f7e890c4dac6

(issue148) Only update list widgets when something new is available.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 24 Sep 2014 15:48:58 +0200
parents dc1941e04373
children 7da9ec20eae4
files ui/mainwindow.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Sep 24 15:48:34 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Sep 24 15:48:58 2014 +0200
@@ -266,7 +266,14 @@
 }
 
 void MainWindow::handleNewList(const QString& fileName, const QDateTime& modDate) {
-    qDebug() << "new list available";
+
+    if (mSettings.value("List/available").toString() == fileName &&
+        getState() == NewListAvailable) {
+        qDebug() << "List already handled";
+        return;
+    } else {
+        qDebug() << "Handling list";
+    }
     mSettings.setValue("List/available", fileName);
     mSettings.setValue("List/availableDate", modDate);
 

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