diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 21:15:35 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-17 21:15:35 +0000 |
commit | 99531579e3729a5966b3319ad40d535684cd607f (patch) | |
tree | 18b3754304964e6f166dd01c7c65df02ec6ed8b9 /qt-ui/filtermodels.cpp | |
parent | 609036c57031073b6ae7e829c0473815297b8247 (diff) | |
download | subsurface-99531579e3729a5966b3319ad40d535684cd607f.tar.gz |
Only show tags in filter panel that are actually used
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/filtermodels.cpp')
-rw-r--r-- | qt-ui/filtermodels.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |