Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.behavior.fsm/src')
-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