Revision: 9997
Author:   gwt.mirror...@gmail.com
Date:     Fri Apr 15 08:19:00 2011
Log: Fixing a bug in CellTree where the Show More button doesn't work for the root node.

Issue: 5547

Review at http://gwt-code-reviews.appspot.com/1420801

Review by: rchan...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9997

Modified:
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java

=======================================
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java Tue Apr 12 06:14:57 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTree.java Fri Apr 15 08:19:00 2011
@@ -682,7 +682,7 @@
     final boolean isMouseDown = "mousedown".equals(eventType);
     final boolean isClick = "click".equals(eventType);
final CellTreeNodeView<?> nodeView = findItemByChain(chain, 0, rootNode);
-    if (nodeView != null && nodeView != rootNode) {
+    if (nodeView != null) {
       if (isMouseDown) {
         Element showMoreElem = nodeView.getShowMoreElement();
         if (nodeView.getImageElement().isOrHasChild(target)) {
@@ -697,7 +697,7 @@
       }

       // Forward the event to the cell
-      if (nodeView.getSelectionElement().isOrHasChild(target)) {
+ if (nodeView != rootNode && nodeView.getSelectionElement().isOrHasChild(target)) {
         // Move the keyboard focus to the clicked item.
         if (isClick) {
           /*

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to