Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuai Li2016-05-24 09:27:31 +0000
committerGerrit Code Review @ Eclipse.org2016-05-24 11:20:24 +0000
commitfb10481b9931d5ee83ffa3e39ab464ea4534eb70 (patch)
tree11de51aa632c2badfd37de64af24f473ffc892d9 /plugins/uml
parent4984d0f21d4c5f9460880f81d9dbacf8c2e40969 (diff)
downloadorg.eclipse.papyrus-fb10481b9931d5ee83ffa3e39ab464ea4534eb70.tar.gz
org.eclipse.papyrus-fb10481b9931d5ee83ffa3e39ab464ea4534eb70.tar.xz
org.eclipse.papyrus-fb10481b9931d5ee83ffa3e39ab464ea4534eb70.zip
Bug 493292 - [Class Diagram] Dropping a stereotyped UML comment crash
eclipse - Remove layout listener before painting then add it again - Remove scrollbars Change-Id: If2e0c4a49f6c5c8a8c158a34a7ae7c5a80065468 Signed-off-by: Shuai Li <shuai.li@cea.fr>
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/HTMLCornerBentFigure.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RichTextRenderer.java2
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/HTMLCornerBentFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/HTMLCornerBentFigure.java
index e67f2db0d44..e214d45ce92 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/HTMLCornerBentFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/HTMLCornerBentFigure.java
@@ -190,11 +190,19 @@ public class HTMLCornerBentFigure extends CornerBentFigure implements ILabelFigu
private class HTMLLayoutListener extends LayoutListener.Stub {
@Override
public void postLayout(IFigure container) {
+ if (htmlLayoutListener != null) {
+ container.removeLayoutListener(htmlLayoutListener);
+ }
+
if (oldWidth != container.getClientArea().width || oldHeight != container.getClientArea().height) {
oldWidth = container.getClientArea().width;
oldHeight = container.getClientArea().height;
paintHTML();
}
+
+ if (htmlLayoutListener != null) {
+ container.addLayoutListener(htmlLayoutListener);
+ }
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RichTextRenderer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RichTextRenderer.java
index ef6bddbd539..dd0199e1d84 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RichTextRenderer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/RichTextRenderer.java
@@ -55,7 +55,7 @@ public class RichTextRenderer implements HTMLRenderer {
contentPane = new AnimatableScrollPane();
//contentPane = new ScrollPane();
contentPane.setOpaque(false);
- contentPane.setScrollBarVisibility(ScrollPane.AUTOMATIC);
+ contentPane.setScrollBarVisibility(ScrollPane.NEVER);
contentPane.setContents(renderFigure);
painter = new RichTextPainter(true);

Back to the top