summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/models.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 5309e2860..7c0b35cee 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -2268,7 +2268,9 @@ QVariant TagFilterModel::data(const QModelIndex &index, int role) const
if (role == Qt::CheckStateRole) {
return checkState[index.row()] ? Qt::Checked : Qt::Unchecked;
} else if (role == Qt::DisplayRole) {
- return stringList()[index.row()];
+ QString tag = stringList()[index.row()];
+ int count = count_dives_with_tag(tag.toUtf8().data());
+ return tag + QString("(%1)").arg(count);
}
return QVariant();
}