Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
index 6f69ce0f689..d319824483d 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014, 2018 CEA LIST and others.
+ * Copyright (c) 2010, 2014, 2018, 2023 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -13,6 +13,7 @@
* Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring, cleanup, added support for PapyrusLabel element
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Add IRoundedRectangleFigure use case(436547)
* Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - NPE if SVG unit is not in pixels (521232)
+ * Pascal Bannerot (CEA LIST) pascal.bannerot@cea.fr - Bug 582007
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
@@ -173,6 +174,8 @@ public class SVGNodePlateFigure extends DefaultSizeNodeFigure {
element = svgDocument.getElementById("PapyrusLabel");
if (element != null) {
labelBounds = toDraw2DRectangle((SVGRectElement) element);
+ // Bug 582007: force labelBounds value to null to prevent freeze (infinite refresh loop)
+ labelBounds = null;
}
} else {
this.svgDimension = null;
@@ -395,7 +398,7 @@ public class SVGNodePlateFigure extends DefaultSizeNodeFigure {
*/
private Rectangle getDraw2DAnchor() {
if (this.getChildren().size() > 0 && this.getChildren().get(0) instanceof IFigure) {
- IFigure primaryShape = (IFigure) this.getChildren().get(0);
+ IFigure primaryShape = this.getChildren().get(0);
for (Object subFigure : primaryShape.getChildren()) {
if (subFigure instanceof ScalableCompartmentFigure) {
return ((IFigure) subFigure).getBounds();

Back to the top