Fix potential infinite loop for selection change events
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 22 Feb 2016 15:53:44 +0000 (16:53 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 22 Feb 2016 15:54:01 +0000 (16:54 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java

index 5e6f23c0a5f1698f5c1a68f0a61bcdbe443f3394..b319d21fd37df013af03a65a72ab04f4d7681e7d 100644 (file)
@@ -248,7 +248,6 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
 
     public void updateRootEntities(List<SpecimenOrObservationBase> derivates) {
-
             if(derivates!=null){
                 this.derivateToRootEntityMap = new HashMap<SpecimenOrObservationBase<?>, SpecimenOrObservationBase<?>>();
                 this.rootElements = new HashSet<SpecimenOrObservationBase<?>>();
@@ -481,6 +480,9 @@ public class DerivateView extends EditorPart implements IPartContentHasFactualDa
 
     @Override
     public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+        if(part == this){
+            return;
+        }
         if(viewer.getTree().isDisposed()){
             return;
         }