aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Salvador Cuñat <salvador.cunat@gmail.com>2016-07-07 21:55:17 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-07-09 12:09:57 -0700
commitaa1446bed2e485757f528b11a9a73a7b7f7f4c33 (patch)
tree7c1574d4a2cd4e99798f07b77551198a561555de
parent54871debfbd6d36ddc16deeca7124553256c5608 (diff)
downloadsubsurface-aa1446bed2e485757f528b11a9a73a7b7f7f4c33.tar.gz
Make filters work again in master
Since 6cd711a1 filters don't work. This went unnoticed because the commit wasn't applied on v4.5-branch. Partially reverting it makes filters work again. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-models/filtermodels.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index b4aacf1bd..44b5daa61 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -2,6 +2,8 @@
#include "qt-models/models.h"
#include "core/display.h"
#include "qt-models/divetripmodel.h"
+#include "desktop-widgets/divelistview.h"
+#include "desktop-widgets/mainwindow.h"
#include <QDebug>
@@ -368,16 +370,9 @@ bool MultiFilterSortModel::filterAcceptsRow(int source_row, const QModelIndex &s
void MultiFilterSortModel::myInvalidate()
{
- //WARNING:
- //TODO:
- // THIS CODE BELOW IS COMPLETELY BROKEN. I KNOW, I WROTE IT.
- // REMOVE THIS, MAKE IT SANE.
- // GRRRRR.
-
-#if 0
int i;
struct dive *d;
- // DiveListView *dlv = MainWindow::instance()->dive_list();
+ DiveListView *dlv = MainWindow::instance()->dive_list();
divesDisplayed = 0;
@@ -415,7 +410,6 @@ void MultiFilterSortModel::myInvalidate()
if (curr_dive_site) {
dlv->expandAll();
}
-#endif
}
void MultiFilterSortModel::addFilterModel(MultiFilterInterface *model)