#5234 Add correct updated objects to change event
authorCherian Mathew <c.mathew@bgbm.org>
Thu, 10 Sep 2015 12:05:32 +0000 (14:05 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Thu, 10 Sep 2015 12:05:32 +0000 (14:05 +0200)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingDeleteTaxonNodeOperation.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/NewTaxonNodeWizard.java

index e1df3bd07e20d6c7474da39d5c043529c026e799..4fefa62a9723d5b07f5e5b57a28a583d84aa7992 100644 (file)
@@ -57,6 +57,8 @@ public class RemotingDeleteTaxonNodeOperation extends RemotingCdmUpdateOperation
      */
     @Override
     protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+
+
         if(treeNodes.size() == 1) {
             // when single node this is either a taxon or a classification
             ITaxonTreeNode node = treeNodes.iterator().next();
index 1d67fd636bb92f1b349127943a0b8e19aebd408d..735bb0870bac07967f30f6d94a521c69c83f1913 100644 (file)
@@ -60,12 +60,14 @@ public class NewTaxonNodeWizard extends AbstractNewEntityWizard<ITaxonTreeNode>{
                 // by making the affected objects a set of ICdmBase
                 // Also, this needs to be moved to the new operations
                 // architecture.
-                if(parent instanceof Classification) {
-                    affectedObjects.add((Classification)parent);
+
+                TaxonNode parentNode = taxonNode.getParent();
+                if(parentNode.getParent() == null) {
+                    affectedObjects.add(taxonNode.getClassification());
                 }
 
-                if(parent instanceof TaxonNode) {
-                    affectedObjects.add((TaxonNode)parent);
+                if(parentNode instanceof TaxonNode) {
+                    affectedObjects.add(parentNode);
                 }
 
                 CdmApplicationState.getCurrentDataChangeService()