Correct index out of bounds exception in focusGoDown
Adds a check to stop treeList at the second last item instead of allowing the list index to go negative. Fixes#17
This commit is contained in:
parent
d1c6144ae3
commit
737967c2f8
1 changed files with 1 additions and 1 deletions
|
|
@ -609,7 +609,7 @@ public abstract class TreeController<T extends ITreeNode<T>> extends GenericForw
|
||||||
|
|
||||||
int myPosition = parent.getIndex();
|
int myPosition = parent.getIndex();
|
||||||
|
|
||||||
if (myPosition < treeItems.size() - 1) {
|
if ((myPosition < treeItems.size() - 1) && myPosition > 0) {
|
||||||
// The current node is not the last one
|
// The current node is not the last one
|
||||||
Treerow downTreerow = treeItems.get(myPosition + 1).getTreerow();
|
Treerow downTreerow = treeItems.get(myPosition + 1).getTreerow();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue