summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-11 21:51:53 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-07-11 21:51:53 +0000
commit3a10ff2a85448881863e8d6f729c1abebdc8297a (patch)
treef64baf95757722d14ea0092c8ab9b5becfe4be4d /src
parent3309f5b6227559456b25bb9e5c4051ccb72b6a13 (diff)
downloadfpGUI-3a10ff2a85448881863e8d6f729c1abebdc8297a.tar.xz
* Fixed the recusion bug in Treeview when searching for a node.
* Minor improvements to the GUI Test Runner. * Extended the treeview unit tests.
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui_tree.pas14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas
index e308d77f..ecc5004a 100644
--- a/src/gui/gui_tree.pas
+++ b/src/gui/gui_tree.pas
@@ -12,7 +12,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Description:
- Defines a basic Treeview control and Node classes.
+ Defines a basic Treeview control and Node classes. The treeview
+ keeps track of the nodes in a double-linked list structure.
+ Each Node as .prev and .next property pointing to it's neighbours.
}
unit gui_tree;
@@ -406,16 +408,16 @@ begin
if h.Text = AText then
begin
result := h;
- exit;
+ Exit; //==>
end;
if h.count > 0 then
begin
- result := h.FirstSubNode.FindSubNode(AText, ARecursive);
+ result := h.FindSubNode(AText, ARecursive);
if result <> nil then
- exit;
+ Exit; //==>
end;
h := h.next;
- end;
+ end; { while }
end
else
begin
@@ -453,7 +455,7 @@ begin
end;
if h.Count > 0 then
begin
- result := h.FirstSubNode.FindSubNode(ATreeNodeFindMethod);
+ result := h.FindSubNode(ATreeNodeFindMethod);
if result <> nil then
Exit; //==>
end;