From: Tuukka Lehtonen Date: Tue, 10 Jan 2017 20:32:38 +0000 (+0200) Subject: Fixed component type editor Lift Properties domain setting. X-Git-Tag: v1.27.0~28 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=ab3be1ad495b373b656697e4f156f6a308f80c98;p=simantics%2Fplatform.git Fixed component type editor Lift Properties domain setting. Previously Lift Properties would copy the lifted property relation over to the user component type as-is which would also leave all the existing L0.HasDomain relations of the relation in the copy. This can cause totally unwanted HasDomain definitions in the property relations which in turn can cause unexpected export-import problems later because of those unexpected dependencies. This changes the code to first remove all the existing HasDomain definitions from the copied property relation and then add the HasDomain relation to the target component type. refs #6947 Change-Id: I10090db57ab343abcd35fe93e54265668ecb7e72 --- diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ConfigurationPropertiesSection.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ConfigurationPropertiesSection.java index 0d09b3bd2..9a2a713df 100644 --- a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ConfigurationPropertiesSection.java +++ b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ConfigurationPropertiesSection.java @@ -425,6 +425,7 @@ public class ConfigurationPropertiesSection implements ComponentTypeViewerSectio LiftedProperty p = result.get(index); Collection copyAss = Layer0Utils.copyTo(graph, null, ass); if(copyAss.size() == 1) { + graph.deny(copy, L0.HasDomain); graph.claim(data.componentType, L0.DomainOf, copy); Layer0Utils.assert_(graph, data.componentType, copy, copyAss.iterator().next()); CommentMetadata cm = graph.getMetadata(CommentMetadata.class);