From: jsimomaa Date: Wed, 1 Feb 2017 09:58:41 +0000 (+0200) Subject: Minor GraphLayerManager fixes X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F312%2F1;p=simantics%2Fplatform.git Minor GraphLayerManager fixes refs #6958 Change-Id: I476367efad804f11e028006813cb5c1211f2cd8f --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/layer/GraphLayerManager.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/layer/GraphLayerManager.java index 41947ef99..e92ce1b41 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/layer/GraphLayerManager.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/layer/GraphLayerManager.java @@ -433,8 +433,10 @@ public class GraphLayerManager { graph.forHasStatement(element, gl.getVisible(), element, new AsyncProcedureAdapter() { @Override public void execute(AsyncReadGraph graph, Boolean result) { - synchronized (visible) { - visible.add(l); + if (result) { + synchronized (visible) { + visible.add(l); + } } if (DEBUG_LAYERS) System.out.println(" Visible on layer '" + gl.getName() + "'"); @@ -452,8 +454,10 @@ public class GraphLayerManager { graph.forHasStatement(element, gl.getFocusable(), element, new AsyncProcedureAdapter() { @Override public void execute(AsyncReadGraph graph, Boolean result) { - synchronized (focusable) { - focusable.add(l); + if (result) { + synchronized (focusable) { + focusable.add(l); + } } if (DEBUG_LAYERS) System.out.println(" Focusable on layer '" + gl.getName() + "'");