Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2017-04-25 04:04:52 -0400
committerJuergen Haug2017-08-02 04:46:41 -0400
commit0c64a34fbe7d42aed56c8e2657992b1fcbfdd9bd (patch)
tree0fc228a6a8eee910d6353009e4e75ec08364a6b5 /plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui
parentbf5b8c3b2f43f8e917048fc28553a126b9c3d352 (diff)
downloadorg.eclipse.etrice-0c64a34fbe7d42aed56c8e2657992b1fcbfdd9bd.tar.gz
org.eclipse.etrice-0c64a34fbe7d42aed56c8e2657992b1fcbfdd9bd.tar.xz
org.eclipse.etrice-0c64a34fbe7d42aed56c8e2657992b1fcbfdd9bd.zip
[ui.behavior] fixed refined state base position
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui')
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/support/BaseDiagramPositionProvider.xtend12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/support/BaseDiagramPositionProvider.xtend b/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/support/BaseDiagramPositionProvider.xtend
index 33bbdf199..aca12cb84 100644
--- a/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/support/BaseDiagramPositionProvider.xtend
+++ b/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/support/BaseDiagramPositionProvider.xtend
@@ -102,10 +102,14 @@ class BaseDiagramPositionProvider implements IPositionProvider {
}
override getPosition(StateGraphNode node) {
- if(node instanceof RefinedState){
- baseDiagram.getPictograms(node.target).findFirst[parentBo instanceof StateGraph]?.toPosAndSize(node.margin)
- } else {
- baseDiagram.getPictograms(node).findFirst[parentBo instanceof StateGraph]?.toPosAndSize(node.margin)
+ val getBasePos = [baseDiagram.getPictograms(it).findFirst[parentBo instanceof StateGraph]?.toPosAndSize(node.margin)]
+
+ return if(node instanceof RefinedState){
+ // 1. RefinedState is base diagram
+ // 2. RefinedState target is in base diagram
+ getBasePos.apply(node)?:getBasePos.apply(node.target)
+ } else {
+ getBasePos.apply(node)
}
}

Back to the top