Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-05-10 15:38:00 +0000
committerGerrit Code Review @ Eclipse.org2016-05-26 08:18:46 +0000
commite6450f0d3364d2ee0e84a35e5216d67d9af731bf (patch)
tree0f7154afa9b0f11c3a141631fdac7e9518aeacca /plugins/infra/gmfdiag
parente72747bd8a2746566d17556072b1a4023af0ef03 (diff)
downloadorg.eclipse.papyrus-e6450f0d3364d2ee0e84a35e5216d67d9af731bf.tar.gz
org.eclipse.papyrus-e6450f0d3364d2ee0e84a35e5216d67d9af731bf.tar.xz
org.eclipse.papyrus-e6450f0d3364d2ee0e84a35e5216d67d9af731bf.zip
Bug 493363 - [Test] Regression in ShapeCustomisationTest
https://bugs.eclipse.org/bugs/show_bug.cgi?id=493363 Change-Id: I418b0a8f08ef17dc55fccda29f3b605d578d6062 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/infra/gmfdiag')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleValueCommand.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleValueCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleValueCommand.java
index 7e64962d12b..ceed75140dd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleValueCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/databinding/custom/CustomStyleValueCommand.java
@@ -53,7 +53,8 @@ public class CustomStyleValueCommand extends AbstractCommand {
}
valueStyle.eSet(styleFeature, value);
- if (createStyle || valueStyle.eContainer() == null) {// valueStyle.eContainer() == null if CSS valueStyle is set but no Style on notation
+ createStyle = valueStyle.eContainer() == null; // if CSS valueStyle is set but no Style on notation. Set the createStyle to remove it at the undo.
+ if (createStyle) {
view.getStyles().add(valueStyle);
}
}
@@ -72,7 +73,7 @@ public class CustomStyleValueCommand extends AbstractCommand {
@Override
public void undo() {
NamedStyle valueStyle = view.getNamedStyle(styleClass, styleName);
- ;
+
if (createStyle) {
view.getStyles().remove(valueStyle);
} else {

Back to the top