]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #5008
authorJohn Alhroos <john.ahlroos@itmill.com>
Mon, 21 Jun 2010 10:30:04 +0000 (10:30 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Mon, 21 Jun 2010 10:30:04 +0000 (10:30 +0000)
svn changeset:13807/svn branch:6.4

src/com/vaadin/terminal/gwt/client/ui/VTree.java

index 22d10f13c9f1b61fe978f3066b8a0092021f98a9..d198a3b2c9863d323c51bb2edf275969688f6b63 100644 (file)
@@ -252,7 +252,8 @@ public class VTree extends SimpleFocusablePanel implements Paintable,
 
         selectedIds = uidl.getStringArrayVariableAsSet("selected");
 
-        if (lastSelection == null && focusedNode == null) {
+        if (lastSelection == null && focusedNode == null
+                && !selectedIds.isEmpty()) {
             setFocusedNode(keyToNode.get(selectedIds.iterator().next()));
             focusedNode.setFocused(false);
         }