don't blink if bg is file color and node is loading

This commit is contained in:
Konstantin Bulenkov
2012-05-07 10:59:53 +02:00
parent 2ca03e447b
commit 2d2e9ba756
@@ -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);