Removed bug where "Add new taxon" was putting a blank entry in Recent Names.
authorp.ciardelli <p.ciardelli@localhost>
Fri, 21 Nov 2008 14:36:31 +0000 (14:36 +0000)
committerp.ciardelli <p.ciardelli@localhost>
Fri, 21 Nov 2008 14:36:31 +0000 (14:36 +0000)
eclipseprojects/eu.etaxonomy.taxeditor/src/eu/etaxonomy/taxeditor/actions/ui/OpenTaxonEditorAction.java

index b77979e78fbe6b9b2abea78f5ef33a27f46d1324..75eeebf3f361cddae51558cf31c93decc14e4587 100644 (file)
@@ -78,15 +78,13 @@ public class OpenTaxonEditorAction extends Action {
                        if (treeViewer != null) {\r
                                treeViewer.revealTaxon(taxon);\r
                        }\r
+                       \r
+                       // Add to recent names list if not already there                \r
+                       if (!TaxEditorPlugin.getDefault().getObservableRecentNamesList().contains(taxon)) {\r
+                               TaxEditorPlugin.getDefault().getObservableRecentNamesList().add(0, taxon);\r
+                       }\r
                }\r
-                               \r
-               // If this is a non-empty taxon being opened for the first time,\r
-               //  add to recent names list            \r
-               if (taxon.getName() != null &&\r
-                               !TaxEditorPlugin.getDefault().getObservableRecentNamesList().contains(taxon)) {\r
-                       TaxEditorPlugin.getDefault().getObservableRecentNamesList().add(0, taxon);\r
-               }\r
-\r
+               \r
                IEditorInput input = new NameEditorInput(taxon);\r
        try {\r
                        UiUtil.openEditor(input, MultiPageTaxonEditor.ID);\r