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>
This commit is contained in:
Dirk Hohndel 2014-12-09 20:55:31 -07:00
parent 6f231c67a0
commit b575069638

View file

@ -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));