diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-12-09 20:55:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-09 20:55:31 -0700 |
commit | b575069638e21f45d295faaa248e4b057ea89cc0 (patch) | |
tree | c558b1adf0f776bd77954e609b62ba01a5bd26e7 | |
parent | 6f231c67a01201b02d0ffc0f46bf7ff26242e2a9 (diff) | |
download | subsurface-b575069638e21f45d295faaa248e4b057ea89cc0.tar.gz |
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 <dirk@hohndel.org>
-rw-r--r-- | qt-ui/filtermodels.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |