diff --git a/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java b/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java index f3bf7a773e16..568348118ca3 100644 --- a/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java +++ b/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java @@ -168,14 +168,13 @@ public class WideSelectionTreeUI extends BasicTreeUI { boolean leaf = tree.getModel().isLeaf(selectionPath.getLastPathComponent()); int toSelect = -1; int toScroll = -1; - if (!leaf && tree.isExpanded(selectionRow)) { + if ((!leaf && tree.isExpanded(selectionRow)) || leaf) { if (selectionRow + 1 < tree.getRowCount()) { toSelect = selectionRow + 1; toScroll = toSelect; } - } else if (leaf) { - toScroll = selectionRow; } + //todo[kb]: make cycle scrolling if (toSelect != -1) { tree.setSelectionInterval(toSelect, toSelect);