From 99531579e3729a5966b3319ad40d535684cd607f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 17 Nov 2014 21:15:35 +0000 Subject: Only show tags in filter panel that are actually used Signed-off-by: Dirk Hohndel --- qt-ui/filtermodels.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp index a25f501f0..7ef0df3b9 100644 --- a/qt-ui/filtermodels.cpp +++ b/qt-ui/filtermodels.cpp @@ -136,7 +136,8 @@ void TagFilterModel::repopulate() QStringList list; struct tag_entry *current_tag_entry = g_tag_list->next; while (current_tag_entry != NULL) { - list.append(QString(current_tag_entry->tag->name)); + if (count_dives_with_tag(current_tag_entry->tag->name) > 0) + list.append(QString(current_tag_entry->tag->name)); current_tag_entry = current_tag_entry->next; } qSort(list); -- cgit v1.2.3-70-g09d2