Mercurial > trustbridge
diff ui/mainwindow.cpp @ 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 |
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);