From 2d2e9ba756b278f2f7e1a61f8eb7db7ee2e5acde Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 7 May 2012 10:56:55 +0200 Subject: [PATCH] don't blink if bg is file color and node is loading --- .../src/com/intellij/ui/treeStructure/Tree.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index 10e982510430..724fd13daa0f 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -303,7 +303,11 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith final TreePath path = getPathForRow(row); if (path != null) { final Rectangle bounds = getRowBounds(row); - final Object component = path.getLastPathComponent(); + Object component = path.getLastPathComponent(); + final Object[] pathObjects = path.getPath(); + if (component instanceof LoadingNode && pathObjects.length > 1) { + component = pathObjects[pathObjects.length - 2]; + } final Object object = ((DefaultMutableTreeNode)component).getUserObject(); Color color = getFileColorFor(object);