ref #5837: if nomenclatural titleCache and titleCache are equal only one is shown...
authorKatja Luther <k.luther@bgbm.org>
Thu, 15 Sep 2016 11:54:13 +0000 (13:54 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 15 Sep 2016 11:54:13 +0000 (13:54 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java

index be5750fcc3b27c1c4ab66e398d319805046c91e1..e61943255dd5e209ff5ab037ef1bd9a0c7135424 100755 (executable)
@@ -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()+"]";
                        }