summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2013-08-08 18:45:37 (EDT)
committerJuergen Haug2013-08-08 18:45:37 (EDT)
commitf96da558530dbec481827c933bd9882a3f095aa0 (patch)
treee0cab7de21e0490e6f41dbbd52628c67ba0d2aa6
parent2af0dfc2f970f9e87d4a30a0ae4207c418933c41 (diff)
downloadorg.eclipse.etrice-f96da558530dbec481827c933bd9882a3f095aa0.zip
org.eclipse.etrice-f96da558530dbec481827c933bd9882a3f095aa0.tar.gz
org.eclipse.etrice-f96da558530dbec481827c933bd9882a3f095aa0.tar.bz2
[ui.behavior] fixed state resizerefs/changes/67/15267/1
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
index c01be75..00e8551 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/support/StateSupport.java
@@ -788,8 +788,16 @@ public class StateSupport {
Object childBo = getBusinessObjectForPictogramElement(childShape);
if (childBo instanceof TrPoint) {
ga = childShape.getGraphicsAlgorithm();
- ga.setX((int) (ga.getX()*sx));
- ga.setY((int) (ga.getY()*sy));
+
+ int midX = ga.getX() + ga.getWidth()/2 - MARGIN;
+ int midY = ga.getY() + ga.getHeight()/2 - MARGIN;
+ midX = (int) (midX*sx);
+ midY = (int) (midY*sy);
+ midX = midX - ga.getWidth()/2 + MARGIN;
+ midY = midY - ga.getHeight()/2 + MARGIN;
+
+ Graphiti.getGaService().setLocation(ga, midX, midY);
+ updatePictogramElement(childShape);
}
}