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>
This commit is contained in:
Salvador Cuñat 2016-07-07 21:55:17 +02:00 committed by Dirk Hohndel
parent 54871debfb
commit aa1446bed2

View file

@ -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)