From 8086b39e11da344f9c931ea8d325d2ef94982913 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 13 Nov 2014 12:45:32 -0800 Subject: 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 --- qt-ui/filtermodels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') 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(); \ -- cgit v1.2.3-70-g09d2