From: Marko Luukkainen Date: Fri, 1 Feb 2019 13:01:16 +0000 (+0200) Subject: Fix selectPath returning true for nodes that haven't been loaded. X-Git-Tag: v1.43.0~136^2~201^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F2637%2F1;p=simantics%2Fplatform.git Fix selectPath returning true for nodes that haven't been loaded. gitlab #253 Change-Id: Ifdc5853e34f2c213acc6dcbffb4da3085936d60d --- diff --git a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java index df736c1e6..40c21585a 100644 --- a/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java +++ b/bundles/org.simantics.browsing.ui.swt/src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java @@ -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);