diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/fpg_tree.pas | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas index e38b32da..d8f3fde2 100644 --- a/src/gui/fpg_tree.pas +++ b/src/gui/fpg_tree.pas @@ -104,7 +104,7 @@ type function FindSubNode(AData: TObject; ARecursive: Boolean): TfpgTreeNode; overload; function GetMaxDepth: integer; function GetMaxVisibleDepth: integer; - procedure Append(var aValue: TfpgTreeNode); + procedure Append(var ANode: TfpgTreeNode); procedure Clear; // remove all nodes recursively procedure Collapse; procedure Expand; @@ -418,20 +418,21 @@ begin end; end; -procedure TfpgTreeNode.Append(var aValue: TfpgTreeNode); +procedure TfpgTreeNode.Append(var ANode: TfpgTreeNode); begin - aValue.Parent := self; - aValue.Next := nil; + DoTreeCheck(ANode); + ANode.Parent := self; + ANode.Next := nil; if FFirstSubNode = nil then - FFirstSubNode := aValue; + FFirstSubNode := ANode; - aValue.prev := FLastSubNode; + ANode.Prev := FLastSubNode; if FLastSubNode <> nil then - FLastSubNode.Next := aValue; + FLastSubNode.Next := ANode; - FLastSubNode := aValue; + FLastSubNode := ANode; end; function TfpgTreeNode.FindSubNode(AText: string; ARecursive: Boolean): TfpgTreeNode; |