]> gerrit.simantics Code Review - simantics/platform.git/commit
Fixed route graph splitting and diagram mapping race condition problem 99/4399/2 v1.43.0
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 21 Aug 2020 13:06:50 +0000 (16:06 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 21 Aug 2020 13:11:02 +0000 (13:11 +0000)
commitcc78488e2230fea07726acb86db3c7dd245b39ce
tree96876a6b274d51b762db18972c07c8ff41dd2c0e
parent2526602db10c29f0c30c4a3cffaf33012d9c4a0e
Fixed route graph splitting and diagram mapping race condition problem

RouteGraphConnectionSplitter.doSplit now always splits the connection so
that part #1 is always the part that stays with the existing diagram
connection and part #2 contains the entities that are moved to the newly
created route graph connection resource. Part #1 is the part where the
"output terminal" attached to the connection lies. This simplifies and
clarifies the implementation of doSplit and does not require moving
diagram mapping statements around.

Also, more importantly RouteGraphConnectionSplitter and FlagUtil changes
ensure that diagram mapping is *not* executed in FlagUtil.join, which
was the main cause of the previous corruption. Diagram mapping is only
activated once for the affected diagram(s) after everything else is
done.

gitlab #549
gitlab #586

Change-Id: Icf7479e8e111bf663f637d6909419267cfa4eec4
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/segments/Segment.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/splitting/SplittedRouteGraph.java
bundles/org.simantics.diagram/src/org/simantics/diagram/flag/FlagUtil.java
bundles/org.simantics.diagram/src/org/simantics/diagram/flag/RouteGraphConnectionSplitter.java
bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/RouteGraphModification.java