From: Tuukka Lehtonen Date: Fri, 1 Nov 2019 07:21:56 +0000 (+0000) Subject: Revert "Avoid duplicate evaluation of procedural component type requests" X-Git-Tag: v1.43.0~136^2~38^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F3437%2F2;p=simantics%2Fplatform.git Revert "Avoid duplicate evaluation of procedural component type requests" This reverts commit 45ddae414b7f632d52546c3c46b0f6d2b4ab37af. The change seems to have broken existing products for unknown reasons. Let's revert immediately and see what went wrong afterwards. gitlab #408 Change-Id: I7deabcb0fd6982963d809e0549a1e4a66165e9bb --- diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java index 8bf4e3df6..e43007637 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java @@ -50,7 +50,6 @@ import org.simantics.db.layer0.variable.Variable; import org.simantics.db.layer0.variable.VariableMap; import org.simantics.db.layer0.variable.VariableMapImpl; import org.simantics.db.layer0.variable.VariableNode; -import org.simantics.db.layer0.variable.Variables; import org.simantics.db.service.CollectionSupport; import org.simantics.issues.common.IssueUtils; import org.simantics.layer0.Layer0; @@ -333,11 +332,10 @@ public class Functions { public static List getProceduralDesc(ReadGraph graph, final Variable context) throws DatabaseException { StructuralResource2 STR = StructuralResource2.getInstance(graph); - Variable config = Variables.getConfigurationVariable(graph, context); - final Resource type = config.getPossibleType(graph); + final Resource type = context.getPossibleType(graph); if(type != null) { if(graph.isInstanceOf(type, STR.ProceduralComponentType)) { - return graph.syncRequest(new SubstructureRequest(config)); + return graph.syncRequest(new SubstructureRequest(context)); } } return null;