ref #5837: if nomenclatural titleCache and titleCache are equal only one is shown...
[taxeditor.git] / 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()+"]";
                        }