mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
4e3689370d
commit
f1e7c12e8a
2 changed files with 17 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue