From cd343042b5518b7a45fffb35ccb91cb4d810a6e7 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Fri, 1 Feb 2019 15:01:16 +0200 Subject: [PATCH] Fix selectPath returning true for nodes that haven't been loaded. gitlab #253 Change-Id: Ifdc5853e34f2c213acc6dcbffb4da3085936d60d --- .../src/org/simantics/browsing/ui/swt/GraphExplorerImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.47.1