summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 12:45:32 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 12:45:32 -0800
commit8086b39e11da344f9c931ea8d325d2ef94982913 (patch)
tree9c8ba1440ed46a1412ebaf2483d42c8d073b2bf3 /qt-ui
parentdae76cdc2dad1ec49520c6cb23530adaa5a6134a (diff)
downloadsubsurface-8086b39e11da344f9c931ea8d325d2ef94982913.tar.gz
Adjust the counter function for filter with "none of the above"
So this should count dives with neither buddy nor divemaster, without a location, with no tags, etc. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/filtermodels.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index 2f19233e1..ae98e5ce4 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -51,7 +51,7 @@ QVariant CLASS::data(const QModelIndex &index, int role) const \
return checkState[index.row()] ? Qt::Checked : Qt::Unchecked; \
} else if (role == Qt::DisplayRole) { \
QString value = stringList()[index.row()]; \
- int count = COUNTER_FUNCTION(value.toUtf8().data()); \
+ int count = COUNTER_FUNCTION((index.row() == rowCount() - 1) ? "" : value.toUtf8().data()); \
return value + QString(" (%1)").arg(count); \
} \
return QVariant(); \