From b575069638e21f45d295faaa248e4b057ea89cc0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 9 Dec 2014 20:55:31 -0700 Subject: [PATCH] Don't skip the first tag when filtering No idea why this code was there... but what it caused was an invalid access to checkState[-1] when a dive had that first tag. This explains why sometimes the dives that had that tag were shown, regardless of whether the selected filter criteria should have excluded them or not. Fixes #769 Signed-off-by: Dirk Hohndel --- qt-ui/filtermodels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp index 01d2592f8..aaace6586 100644 --- a/qt-ui/filtermodels.cpp +++ b/qt-ui/filtermodels.cpp @@ -134,7 +134,7 @@ void TagFilterModel::repopulate() if (g_tag_list == NULL) return; QStringList list; - struct tag_entry *current_tag_entry = g_tag_list->next; + struct tag_entry *current_tag_entry = g_tag_list; while (current_tag_entry != NULL) { if (count_dives_with_tag(current_tag_entry->tag->name) > 0) list.append(QString(current_tag_entry->tag->name));