mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Allow to travers the whole tree from root using just Right key
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user