From: Tuukka Lehtonen Date: Sun, 25 Aug 2019 19:12:30 +0000 (+0000) Subject: Merge "Move contents of SCLMain in PlatformUI from pgraph to scl-file" X-Git-Tag: v1.43.0~136^2~96 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=4d9fd8e280d6543fa6f4edd2fab5e02aa04bc26e;hp=920856257841273193c640607e735f5adf09031d Merge "Move contents of SCLMain in PlatformUI from pgraph to scl-file" --- diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java index e300384f1..6f310120b 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependenciesRelation.java @@ -164,6 +164,8 @@ public class DependenciesRelation extends UnsupportedRelation implements Generic }); + result.add(new Entry(graph, resource)); + graph.syncRequest(new ReadRequest() { @Override diff --git a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl index 14a558bec..451bda827 100644 --- a/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl +++ b/bundles/org.simantics.modeling/scl/Simantics/Diagram.scl @@ -512,10 +512,7 @@ setElements (DiagramInfo diagram configuration componentMap) joinMap elementSpec Just connection createNode connection (Terminal elementName terminal) = do element = newOrMappedElement elementName - if terminal == DIA.Flag.ConnectionPoint then - createConnector connection element terminal DIA.HasPlainConnector - else - createConnector connection element terminal DIA.HasPlainConnector + createConnector connection element terminal DIA.HasPlainConnector createNode connection (RouteLine isHorizontal position) = do newEntity [ hasName (freshElementName ()), @@ -552,7 +549,7 @@ setElements (DiagramInfo diagram configuration componentMap) joinMap elementSpec claim a DIA.AreConnected b // Returns (connectionRelation :: Maybe Resource, connector attachment relation :: Resource) resolveAttachmentRelation element terminal defaultAttachmentRelation = - if terminal == DIA.Flag.ConnectionPoint then + if isSubrelationOf terminal DIA.Flag.ConnectionPoint then (Nothing, flagTypeToAttachmentRelation element) else match possibleObject terminal MOD.DiagramConnectionRelationToConnectionRelation with diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/svg/CreateSVGElement.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/svg/CreateSVGElement.java index 1f302a64d..92dbe16a6 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/svg/CreateSVGElement.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/svg/CreateSVGElement.java @@ -2,6 +2,7 @@ package org.simantics.modeling.svg; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import org.simantics.databoard.Bindings; import org.simantics.db.Resource; @@ -35,7 +36,7 @@ public class CreateSVGElement { g.claimValue(transform, new double[] {1.0, 0.0, 0.0, 1.0, mposX, mposY}, Bindings.DOUBLE_ARRAY); element = GraphUtils.create(g, L0.InstanceOf, DIA.SVGElement, - G2D.HasSVGDocument, new String(data), + G2D.HasSVGDocument, new String(data, StandardCharsets.UTF_8), DIA.HasTransform, transform); AddElement.claimFreshElementName(g, diagram, element); } else if ("png".equals(suffix)) {