]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix selectPath returning true for nodes that haven't been loaded. 37/2637/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Feb 2019 13:01:16 +0000 (15:01 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 1 Feb 2019 13:01:16 +0000 (15:01 +0200)
gitlab #253

Change-Id: Ifdc5853e34f2c213acc6dcbffb4da3085936d60d

bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java

index df736c1e6dc2603315bea23f47b46a2170a52f55..40c21585a7d83c5b0b6c6d1c89f845528af3ed50 100644 (file)
@@ -3119,7 +3119,10 @@ class GraphExplorerImpl extends GraphExplorerImplBase implements Listener, Graph
        //System.out.println("NodeContext path : " + contexts);
 
        NodeContext head = tryFind(contexts[position]);
-
+       // tryFind may return null for positions, that actually have NodeContext. 
+       if (head == null)
+           return false;
+       
        if(position == contexts.length-1) {
                return select(head);