summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-25 15:11:21 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-08-25 15:11:21 +0200
commit47de83ddda51711cc86152a76c57bf875a7dddbd (patch)
tree989b51ad556052c33779c4673c095e76a5ec2c90 /src/gui
parent9754b144a806f57d826f7f2fa4914acd30220122 (diff)
downloadfpGUI-47de83ddda51711cc86152a76c57bf875a7dddbd.tar.xz
Treeview bug fix: GotoNextNodeDown did not expand and traverse the last node in RootNode.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fpg_tree.pas9
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;