TreeUi: infinite loop of expanding non-visible empty root fixed
authorKirill Kalishev <kirill.kalishev@jetbrains.com>
Fri, 2 Oct 2009 12:59:28 +0000 (16:59 +0400)
committerKirill Kalishev <kirill.kalishev@jetbrains.com>
Fri, 2 Oct 2009 12:59:28 +0000 (16:59 +0400)
platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java

index 8869acaef8ef8feaa14630c9e0f8f1f7ec773521..13f6ccf4d01941da6de40b28ca9d5c1d0d0a7903 100644 (file)
@@ -805,10 +805,6 @@ class AbstractTreeUi {
           if (expanded) {
             expand(node, canSmartExpand);
           }
-
-          if (expanded || wasLeaf) {
-            expand(node, descriptor, wasLeaf, canSmartExpand);
-          }
         }
 
         removeFromUpdating(node);
@@ -2610,7 +2606,9 @@ class AbstractTreeUi {
       public void onReady(final DefaultMutableTreeNode node) {
 
         if (node.getChildCount() > 0 && !myTree.isExpanded(new TreePath(node.getPath()))) {
-          expand(node, canSmartExpand);
+          if (!isAutoExpand(node)) {
+            expand(node, canSmartExpand);
+          }
         }
 
         if (expandIndex <= 0) {