Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tessier2016-05-30 14:56:01 +0000
committerGerrit Code Review @ Eclipse.org2016-05-31 15:05:32 +0000
commit99fda05382c94368854cd34c35f1f01cd4fdf8bf (patch)
tree0449de9b3d2e9599a086640308c02dab66a9aedc /plugins
parentb82e6e300f10da43dfa6a2c547ff4179c97fbc52 (diff)
downloadorg.eclipse.papyrus-99fda05382c94368854cd34c35f1f01cd4fdf8bf.tar.gz
org.eclipse.papyrus-99fda05382c94368854cd34c35f1f01cd4fdf8bf.tar.xz
org.eclipse.papyrus-99fda05382c94368854cd34c35f1f01cd4fdf8bf.zip
bug 494934: [diagram] port is not refresh when resize
https://bugs.eclipse.org/bugs/show_bug.cgi?id=494934 - invalidate the figure to force a refresh Change-Id: If67092fa1b30fd361022e1ffb3e3af238719ff03 Signed-off-by: Patrick Tessier <Patrick.Tessier@cea.fr> Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
index 6c36aebb84e..5db01469684 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/locator/PortPositionLocator.java
@@ -432,12 +432,16 @@ public class PortPositionLocator implements IBorderItemLocator {
// Refresh nodeShape bounds in case of resize
RoundedRectangleNodePlateFigure nodePlateFigure = FigureUtils.findChildFigureInstance(figure, RoundedRectangleNodePlateFigure.class);
- if (figure instanceof RoundedRectangleNodePlateFigure && nodePlateFigure != null) {
- for (Object child : nodePlateFigure.getChildren()) {
- if (child instanceof IFigure) {
- ((IFigure) child).setBounds(rect);
+ if (nodePlateFigure != null){
+ if (figure instanceof RoundedRectangleNodePlateFigure) {
+ for (Object child : nodePlateFigure.getChildren()) {
+ if (child instanceof IFigure) {
+ ((IFigure) child).setBounds(rect);
+ }
}
}
+ // to force the refresh, invalidate coordinates of the parent if refresh him + all children
+ nodePlateFigure.invalidate();
}
}
}

Back to the top