]> source.dussan.org Git - vaadin-framework.git/commitdiff
Selecting a new node when the previously selected node was not visible (parent not...
authorMarc Englund <marc.englund@itmill.com>
Mon, 16 Jun 2008 10:09:23 +0000 (10:09 +0000)
committerMarc Englund <marc.englund@itmill.com>
Mon, 16 Jun 2008 10:09:23 +0000 (10:09 +0000)
svn changeset:4899/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/ITree.java

index f40d62d099bad2bb3df1eb233c25e64fa1d952dc..2169a41ab8bef8d3e10350a44ae8edbf0b9b2dc1 100644 (file)
@@ -138,7 +138,11 @@ public class ITree extends FlowPanel implements Paintable {
                 while (selectedIds.size() > 0) {
                     final String id = (String) selectedIds.iterator().next();
                     final TreeNode oldSelection = (TreeNode) keyToNode.get(id);
-                    oldSelection.setSelected(false);
+                    if (oldSelection != null) {
+                        // can be null if the node is not visible (parent
+                        // expanded)
+                        oldSelection.setSelected(false);
+                    }
                     selectedIds.remove(id);
                 }
             }