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?p=simantics%2Fplatform.git;a=commitdiff_plain;h=cd343042b5518b7a45fffb35ccb91cb4d810a6e7;hp=0f1223c3cce41690160216eb1ec7be38f7bf4571 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);