diff --git a/platform/platform-impl/src/com/intellij/ui/tree/AsyncTreeModel.java b/platform/platform-impl/src/com/intellij/ui/tree/AsyncTreeModel.java index df4066ed261e..a93e523067c4 100644 --- a/platform/platform-impl/src/com/intellij/ui/tree/AsyncTreeModel.java +++ b/platform/platform-impl/src/com/intellij/ui/tree/AsyncTreeModel.java @@ -359,9 +359,7 @@ public final class AsyncTreeModel extends AbstractTreeModel implements Disposabl LOG.debug("ignore updating of changed node: ", object); return; } - boolean isLoadingRequired = entry.isLoadingRequired(); MapBasedTree.UpdateResult update = tree.update(entry, children); - if (isLoadingRequired) return; boolean removed = !update.getRemoved().isEmpty(); boolean inserted = !update.getInserted().isEmpty(); @@ -380,7 +378,11 @@ public final class AsyncTreeModel extends AbstractTreeModel implements Disposabl return; } } - treeStructureChanged(entry, null, null); + if (!listeners.isEmpty()) { + if (removed) listeners.treeNodesRemoved(update.getEvent(AsyncTreeModel.this, entry, update.getRemoved())); + if (inserted) listeners.treeNodesInserted(update.getEvent(AsyncTreeModel.this, entry, update.getInserted())); + if (contained) listeners.treeNodesChanged(update.getEvent(AsyncTreeModel.this, entry, update.getContained())); + } for (Entry entry : update.getContained()) { if (!entry.isLoadingRequired()) { loadChildren(entry, false);