minor in TaxonNodeDetailElement
authorKatja Luther <k.luther@bgbm.org>
Tue, 6 Oct 2015 09:40:05 +0000 (11:40 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 6 Oct 2015 09:40:05 +0000 (11:40 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java

index 869801d2abca7765b2823fd6906cf1b045b77616..1483a99a100f5ad720504a00be1995a7ee7bda3a 100644 (file)
@@ -174,7 +174,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                        selection_reuseExistingTaxon.setEnabled(enabled);
                        textNewTaxonName.setEnabled(enabled);
 
                        selection_reuseExistingTaxon.setEnabled(enabled);
                        textNewTaxonName.setEnabled(enabled);
 
-                       //setTaxon(selection_reuseExistingName.getEntity());
+                       setTaxon(selection_reuseExistingName.getEntity());
 
                        complete = !textNewTaxonName.getText().isEmpty();
                } else if (eventSource == textNewTaxonName) {
 
                        complete = !textNewTaxonName.getText().isEmpty();
                } else if (eventSource == textNewTaxonName) {
@@ -280,8 +280,10 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                                                .getSec();
                        }
                }
                                                .getSec();
                        }
                }
-               taxon = Taxon.NewInstance(taxonName, secundum);
-               //textNewTaxonName.setText(taxonName.getTitleCache());
+               if (taxonName != null){
+                   taxon = Taxon.NewInstance(taxonName, secundum);
+                   textNewTaxonName.setText(taxonName.getTitleCache());
+               }
        }
 
        private void setOpenInEditor(boolean openInEditor) {
        }
 
        private void setOpenInEditor(boolean openInEditor) {