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

Change-Id: Ifdc5853e34f2c213acc6dcbffb4da3085936d60d
(cherry picked from commit cd343042b5518b7a45fffb35ccb91cb4d810a6e7)

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

index 3cf5f7478cd7af3dc23ff412db75eac0628f87c1..817a8d961022934a251be2ad1086821a024b7b03 100644 (file)
@@ -3118,7 +3118,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);