Roo/tree/TreeNodeUI.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 2 Nov 2011 09:24:16 +0000 (17:24 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 2 Nov 2011 09:24:16 +0000 (17:24 +0800)
Roo/tree/TreeNodeUI.js

index ab2a0b2..035a485 100644 (file)
@@ -466,12 +466,12 @@ Roo.tree.TreeNodeUI.prototype = {
                 // this changes non-leafs into leafs if they have no children.
                 // it's not very rational behaviour..
                 
-                //if(!this.wasLeaf){
-                //    Roo.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf");
-                //    delete this.c1;
-                //    delete this.c2;
-                //    this.wasLeaf = true;
-                //}
+                if(!this.wasLeaf && this.node.leaf){
+                    Roo.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf");
+                    delete this.c1;
+                    delete this.c2;
+                    this.wasLeaf = true;
+                }
             }
             var ecc = "x-tree-ec-icon "+cls;
             if(this.ecc != ecc){