#5139 Add refresh of classification when new taxon is direct child or root node
authorCherian Mathew <c.mathew@bgbm.org>
Fri, 7 Aug 2015 14:10:38 +0000 (16:10 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Fri, 7 Aug 2015 14:10:38 +0000 (16:10 +0200)
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigator.java

index 91b9ad8765624afdf07c7e29a8964e8e477b1514..ccf26252a58f1ab68c1288b765f1a6b617823ed5 100644 (file)
@@ -526,7 +526,12 @@ public class TaxonNavigator extends CommonNavigator implements
     public void onChange(CdmChangeEvent event) {
         for(CdmBase cb : event.getChangedObjects()) {
             if(cb instanceof TaxonNode) {
-                getCommonViewer().refresh(cb);
+                TaxonNode tn = (TaxonNode)cb;
+                if(tn.getTaxon() == null) {
+                    getCommonViewer().refresh(tn.getClassification());
+                } else {
+                    getCommonViewer().refresh(cb);
+                }
             } else if (cb instanceof Classification) {
                 getCommonViewer().refresh();
             }