diff options
author | John Ahlroos <john@vaadin.com> | 2012-10-23 09:37:27 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-10-23 09:37:27 +0300 |
commit | 7a845fdf61f35540c4866a3a9a82015a1a279004 (patch) | |
tree | e26280ad4329d0f7f1d4f682812148056d9c0197 /client/src | |
parent | 6838d421c03f6ce3cb595d450520ed2523a4236c (diff) | |
download | vaadin-framework-7a845fdf61f35540c4866a3a9a82015a1a279004.tar.gz vaadin-framework-7a845fdf61f35540c4866a3a9a82015a1a279004.zip |
Fixed slot stylenames not being removed properly when clearing the stylenames #9576
Change-Id: I5c89d814cb9b0b28bf46a850a6ecc8d7eab56d47
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java | 5 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index 7a2166cde2..9707db610e 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -85,7 +85,10 @@ public abstract class AbstractOrderedLayoutConnector extends // Update slot style names List<String> childStyles = child.getState().styles; - if (childStyles != null && !childStyles.isEmpty()) { + if (childStyles == null) { + getWidget().setSlotStyleNames(child.getWidget(), + (String[]) null); + } else { getWidget().setSlotStyleNames(child.getWidget(), childStyles.toArray(new String[childStyles .size()])); diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java index 91d6852f52..99fd681d63 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VOrderedLayout.java @@ -199,8 +199,10 @@ public class VOrderedLayout extends FlowPanel { */ protected void setStyleNames(String... stylenames) { setStyleName(SLOT_CLASSNAME); - for (String stylename : stylenames) { - addStyleDependentName(stylename); + if (stylenames != null) { + for (String stylename : stylenames) { + addStyleDependentName(stylename); + } } // Ensure alignment style names are correct |