From aa583de71bd7e5f837c98d5c7979a76f015216da Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 4 Oct 2016 00:07:34 +0200 Subject: [PATCH] Allow to travers the whole tree from root using just Right key --- .../src/com/intellij/util/ui/tree/WideSelectionTreeUI.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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);