diff options
-rw-r--r-- | src/gui/fpg_tree.pas | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas index 072ec729..37d2af22 100644 --- a/src/gui/fpg_tree.pas +++ b/src/gui/fpg_tree.pas @@ -1152,10 +1152,15 @@ begin end; procedure TfpgTreeView.GotoNextNodeDown; +var + lNode: TfpgTreeNode; begin - if Selection = RootNode.LastSubNode then + if (Selection = RootNode.LastSubNode) and (RootNode.LastSubNode.CountRecursive = 0) then Exit; - Selection := NextNode(Selection); + + lNode := NextNode(Selection); + if lNode <> nil then + Selection := lNode; end; procedure TfpgTreeView.FullCollapse; |