mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bc8c54f1ee
commit
898d82e647
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue