diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-02 10:23:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-02 10:23:16 -0700 |
commit | 898d82e64768b4e8ac3f6b074d6d5157aa69a1e0 (patch) | |
tree | 0c8b163f7f535526366a59f7a028a38c7b61b42a /qt-ui/maintab.cpp | |
parent | bc8c54f1eedc550f9cd79abfc69db9934577aac8 (diff) | |
download | subsurface-898d82e64768b4e8ac3f6b074d6d5157aa69a1e0.tar.gz |
Notes pane: don't show empty taxonomy tags
No point in searching for the right tag if the user picked no taxonomy to
be shown. And no point in showing an empty value, either.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index a4b1722bd..c0f5434d7 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -515,10 +515,15 @@ void MainTab::updateDiveInfo(bool clear) locationTag = "<small><small>(tags: "; QString connector = ""; for (int i = 0; i < 3; i++) { + if (prefs.geocoding.category[i] == TC_NONE) + continue; for (int j = 0; j < TC_NR_CATEGORIES; j++) { if (ds->taxonomy.category[j].category == prefs.geocoding.category[i]) { - locationTag += connector + QString(ds->taxonomy.category[j].value); - connector = " / "; + QString tag = ds->taxonomy.category[j].value; + if (!tag.isEmpty()) { + locationTag += connector + tag; + connector = " / "; + } break; } } |