diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 22:20:35 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 22:45:47 -0800 |
commit | 616cb18b2919d8131c1520975d7c5eb7e8e4aaec (patch) | |
tree | feb718c137e7b538ed5c57d0db77abc9558a5e35 | |
parent | d032c2a5c53820a3abec983ba9d61366c1f346fd (diff) | |
download | subsurface-616cb18b2919d8131c1520975d7c5eb7e8e4aaec.tar.gz |
Make filters work with dive sites
This simply tracks the names - if we have multiple dives sites with the
same name but different other data (e.g. different GPS), we could easily
get this right (well, somewhat easily, it's a UI question), but for that
we'd have to filter for dive site uuid instead of for dive location name.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/filtermodels.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp index 378f46735..f44ab7cf8 100644 --- a/qt-ui/filtermodels.cpp +++ b/qt-ui/filtermodels.cpp @@ -249,7 +249,7 @@ bool LocationFilterModel::doFilter(struct dive *d, QModelIndex &index0, QAbstrac return true; } // Checked means 'Show', Unchecked means 'Hide'. - QString location(d->location); + QString location(get_dive_location(d)); // only show empty location dives if the user checked that. if (location.isEmpty()) { if (rowCount() > 0) @@ -277,7 +277,7 @@ void LocationFilterModel::repopulate() struct dive *dive; int i = 0; for_each_dive (i, dive) { - QString location(dive->location); + QString location(get_dive_location(dive)); if (!location.isEmpty() && !list.contains(location)) { list.append(location); } |