Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2013-10-25 09:50:19 -0400
committerCamille Letavernier2013-10-25 09:50:19 -0400
commit9ecdf45298cb6e4a1b3f2d3280b39c62c3e4833a (patch)
tree2b5f2011814dca2e047b9de874278e7e0f1e8084 /plugins
parentdce3645e142e04372c9648b471c3fd7efc3bc079 (diff)
downloadorg.eclipse.papyrus-9ecdf45298cb6e4a1b3f2d3280b39c62c3e4833a.tar.gz
org.eclipse.papyrus-9ecdf45298cb6e4a1b3f2d3280b39c62c3e4833a.tar.xz
org.eclipse.papyrus-9ecdf45298cb6e4a1b3f2d3280b39c62c3e4833a.zip
420173: [All diagrams] Symbol may be displayed without respect ratio
https://bugs.eclipse.org/bugs/show_bug.cgi?id=420173
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
index 0768199a0c6..4adaae77964 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/ShapeDisplayCompartmentEditPart.java
@@ -382,7 +382,20 @@ public class ShapeDisplayCompartmentEditPart extends ResizableCompartmentEditPar
* @return the current Style that reperesent the boder
*/
protected BooleanValueStyle getMaintainSymbolRatioStyle(View currentView) {
- return (BooleanValueStyle)currentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO);
+ View parentView = currentView;
+ while(parentView.getElement() == currentView.getElement()) {
+ BooleanValueStyle style = (BooleanValueStyle)parentView.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), MaintainSymbolRatioEditPolicy.MAINTAIN_SYMBOL_RATIO);
+ if(style != null) {
+ return style;
+ }
+
+ if(parentView.eContainer() instanceof View) {
+ parentView = (View)parentView.eContainer();
+ }
+
+ }
+
+ return null;
}
@Override

Back to the top