Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-17 09:52:58 +0000
committerCamille Letavernier2014-02-17 09:52:58 +0000
commit0b9b518f9cca56a3bc61a2b9e57631a6f1953e86 (patch)
tree1a10e059aef740b3e8661e91053643e77c3cb233
parent8a5fe48c50584113b9b565f874c770edcd37e8b2 (diff)
downloadorg.eclipse.papyrus-0b9b518f9cca56a3bc61a2b9e57631a6f1953e86.tar.gz
org.eclipse.papyrus-0b9b518f9cca56a3bc61a2b9e57631a6f1953e86.tar.xz
org.eclipse.papyrus-0b9b518f9cca56a3bc61a2b9e57631a6f1953e86.zip
417396: [CSS] The CSS Engine shall support label visibility & mask
https://bugs.eclipse.org/bugs/show_bug.cgi?id=417396 - Do not reset style for transient compartments (e.g. Stereotype compartments)
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
index 87dd09bf64e..25cec4c4d63 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/command/ResetStyleCommand.java
@@ -92,6 +92,10 @@ public class ResetStyleCommand extends RecordingCommand {
}
private void resetStyle(View view) {
+ //Reset the view (Except for volatile/transient elements which are already derived, e.g. Stereotype compartments)
+ if(view.eContainingFeature().isTransient()) {
+ return;
+ }
Iterator<?> styleIterator = view.getStyles().iterator();
while(styleIterator.hasNext()) {
@@ -115,10 +119,8 @@ public class ResetStyleCommand extends RecordingCommand {
//Remove the Papyrus Style EAnnotations
resetStyleAnnotations(view);
- if(view.eClass() != NotationPackage.eINSTANCE.getDecorationNode()) {
- //Reset the visibility (Except for labels which are not yet supported)
- view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
- }
+ //Reset the visibility
+ view.eUnset(NotationPackage.eINSTANCE.getView_Visible());
}
private void resetStyle(Style style) {

Back to the top