Skip to content

Commit

Permalink
before applying a style the effect of that style is removed now
Browse files Browse the repository at this point in the history
this fixes a problem when cloning an ElementType where it was possible
that the same style was applied twice
  • Loading branch information
void committed May 6, 2012
1 parent 2882496 commit 4fcf4fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Expand Up @@ -34,6 +34,7 @@ public EffectType(final EffectType e) {
for (EffectValueType effectValue : e.effectValues) {
effectValues.add(effectValue.clone());
}
styleId = e.styleId;
}

public EffectType clone() {
Expand Down
Expand Up @@ -56,6 +56,7 @@ public void applyTo(final ElementType elementType, final StyleResolver styleReso
}

void applyToInternal(final ElementType elementType) {
elementType.removeWithTag(getStyleId());
if (attributesType != null) {
attributesType.apply(elementType.getAttributes(), getStyleId());
}
Expand Down

0 comments on commit 4fcf4fc

Please sign in to comment.