diff options
author | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2011-08-24 09:45:31 +0000 |
---|---|---|
committer | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2011-08-24 09:45:31 +0000 |
commit | f10053dab3a47729491d70609e8f89592da9df7f (patch) | |
tree | 2d9ee8eb304286066cf2b71686cf1ec711a63043 /src/com/vaadin | |
parent | de0c9fcd2619ca9ade985f4b2642f49c537584ae (diff) | |
download | vaadin-framework-f10053dab3a47729491d70609e8f89592da9df7f.tar.gz vaadin-framework-f10053dab3a47729491d70609e8f89592da9df7f.zip |
Small bugfix related to #6745: Connectors for Tree
-Tree root nodes received a wrong classname if they had childnodes (the last root node was always treated as a leaf)
-Fixed hover styles in Reindeer
svn changeset:20605/svn branch:6.7
Diffstat (limited to 'src/com/vaadin')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VTree.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java index d7f575d675..d63ddc5e02 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java @@ -266,8 +266,9 @@ public class VTree extends FocusElementPanel implements Paintable, body.clear(); TreeNode childTree = null; + UIDL childUidl = null; for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) { - final UIDL childUidl = (UIDL) i.next(); + childUidl = (UIDL) i.next(); if ("actions".equals(childUidl.getTag())) { updateActionMap(childUidl); continue; @@ -286,8 +287,8 @@ public class VTree extends FocusElementPanel implements Paintable, childTree.addStyleDependentName("root"); childTree.childNodeContainer.addStyleDependentName("root"); } - if (childTree != null) { - boolean leaf = !uidl.getTag().equals("node"); + if (childTree != null && childUidl != null) { + boolean leaf = !childUidl.getTag().equals("node"); childTree.addStyleDependentName(leaf ? "leaf-last" : "last"); childTree.childNodeContainer.addStyleDependentName("last"); } |