fix #5153
authorU-BGBM\k.luther <k.luther@BGBM11732.bgbm.fu-berlin.de>
Tue, 25 Aug 2015 07:50:28 +0000 (09:50 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 25 Aug 2015 08:18:42 +0000 (10:18 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java

index d82f7fe..b490669 100644 (file)
@@ -159,12 +159,14 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                } else if (eventSource == selection_SecRef) {
                        setSecReference(selection_SecRef.getEntity());
                } else if (eventSource == selection_reuseExistingTaxon) {
-                       boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
-                       selection_reuseExistingName.setEnabled(enabled);
-                       textNewTaxonName.setEnabled(enabled);
-
-                       setTaxon(selection_reuseExistingTaxon.getEntity());
-                       complete = !textNewTaxonName.getText().isEmpty();
+                               boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
+                               selection_reuseExistingName.setEnabled(enabled);
+                               textNewTaxonName.setEnabled(enabled);
+                               if (!enabled){
+                                       setTaxon(selection_reuseExistingTaxon.getEntity());
+                               }
+                               complete = !textNewTaxonName.getText().isEmpty();
+                        
                        
                } else if (eventSource == selection_reuseExistingName) {
                        boolean enabled = selection_reuseExistingName.getEntity() == null;