]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Sync git svn branch with SVN repository r33191.
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 14 Sep 2016 11:31:12 +0000 (14:31 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 14 Sep 2016 11:31:12 +0000 (14:31 +0300)
refs #6685

bundles/org.simantics.modeling/src/org/simantics/modeling/typicals/SyncTypicalTemplatesToInstances.java

index 435d6447324e0497b55a7d46b1442412094f37e5..56d61c86845b3a4941e8da58b088f786aac9dcb6 100644 (file)
@@ -437,7 +437,11 @@ public class SyncTypicalTemplatesToInstances extends WriteRequest {
     private boolean isSynchronizedConnector(ReadGraph graph, Resource templateConnection, Resource instanceConnector) throws DatabaseException {\r
        DiagramResource DIA = DiagramResource.getInstance(graph);\r
        Resource instanceConnection = graph.getPossibleObject(instanceConnector, DIA.IsConnectorOf);\r
-       return graph.hasStatement(instanceConnection, MOD.HasElementSource, templateConnection);\r
+       return graph.hasStatement(instanceConnection, MOD.HasElementSource, templateConnection)\r
+                       // If the master connection has been removed, this is all that's left\r
+                       // to identify a connection that at least was originally synchronized\r
+                       // from the typical master to this instance.\r
+                       || graph.hasStatement(instanceConnection, MOD.IsTemplatized);\r
     }\r
 \r
     /**\r