From e16766356f34ed9d7bda18fa47fa45cff6332adc Mon Sep 17 00:00:00 2001 From: Kirill Kalishev Date: Fri, 2 Oct 2009 16:59:28 +0400 Subject: [PATCH] TreeUi: infinite loop of expanding non-visible empty root fixed --- .../com/intellij/ide/util/treeView/AbstractTreeUi.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java b/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java index 8869acaef8ef..13f6ccf4d019 100644 --- a/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java +++ b/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java @@ -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) {