diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-09-17 17:15:37 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-09-17 15:28:37 -0700 |
commit | f1e7c12e8a5e39c32ad74d9b0aee4cb0c0529159 (patch) | |
tree | 55b73f134fe9b24ecac90543c992a06aff931982 /qt-ui/divelistview.cpp | |
parent | 4e3689370d8e81716759a5b29934c35cf848a379 (diff) | |
download | subsurface-f1e7c12e8a5e39c32ad74d9b0aee4cb0c0529159.tar.gz |
Correctly filter dives. (trips are always shown)
This patch correctly filter dives based on tags, but it will
also keep showing all the empty trips.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index d7b48ce77..273517ffb 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -34,7 +34,7 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec setItemDelegate(new DiveListDelegate(this)); setUniformRowHeights(true); setItemDelegateForColumn(DiveTripModel::RATING, new StarWidgetsDelegate(this)); - QSortFilterProxyModel *model = new QSortFilterProxyModel(this); + TagFilterSortModel *model = new TagFilterSortModel(this); model->setSortRole(DiveTripModel::SORT_ROLE); model->setFilterKeyColumn(-1); // filter all columns model->setFilterCaseSensitivity(Qt::CaseInsensitive); @@ -57,8 +57,8 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec searchBox.installEventFilter(this); searchBox.hide(); - connect(showSearchBox, SIGNAL(triggered(bool)), this, SLOT(showSearchEdit())); - connect(&searchBox, SIGNAL(textChanged(QString)), model, SLOT(setFilterFixedString(QString))); +// connect(showSearchBox, SIGNAL(triggered(bool)), this, SLOT(showSearchEdit())); +// connect(&searchBox, SIGNAL(textChanged(QString)), model, SLOT(setFilterFixedString(QString))); } // # Date Rtg Dpth Dur Tmp Wght Suit Cyl Gas SAC OTU CNS Loc |