From 398b9c0f1ea4695b23910b2c4964d39676cb7cf2 Mon Sep 17 00:00:00 2001 From: Katja Luther Date: Thu, 15 Sep 2016 13:54:13 +0200 Subject: [PATCH] ref #5837: if nomenclatural titleCache and titleCache are equal only one is shown in selection dialog --- .../selection/NomenclaturalReferenceSelectionDialog.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java index be5750fcc..e61943255 100755 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java @@ -140,10 +140,9 @@ public class NomenclaturalReferenceSelectionDialog extends UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache) element; String titleCache = uuidAndTitleCache.getTitleCache(); String abbrevTitleCache = uuidAndTitleCache.getAbbrevTitleCache(); - if (abbrevTitleCache == null){ - abbrevTitleCache = "no abbrev title available"; + if (!abbrevTitleCache.equals(titleCache)){ + abbrevTitleCache += " - " + titleCache; } - abbrevTitleCache += " - " + titleCache; if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_ID_IN_ENTITY_SELECTION_DIAOLOG)){ abbrevTitleCache += " ["+uuidAndTitleCache.getId()+"]"; } -- 2.34.1