From 898d82e64768b4e8ac3f6b074d6d5157aa69a1e0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 2 Jul 2015 10:23:16 -0700 Subject: 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 --- qt-ui/maintab.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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 = "(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; } } -- cgit v1.2.3-70-g09d2