From: Marko Luukkainen Date: Fri, 1 Feb 2019 13:24:08 +0000 (+0000) Subject: Merge "Fix selectPath returning true for nodes that haven't been loaded." X-Git-Tag: v1.43.0~136^2~201 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=3260b37ec9ce61bc8a1383a5fc9ab8d8ab9d1fae;hp=fbfec9e8c7d8d768d9c6327060d9333b2feaea81 Merge "Fix selectPath returning true for nodes that haven't been loaded." --- 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);