Closed mksjgj closed 2 months ago
Please respect our guidelines on the project homepage for submitting bugs. Please include your version of Virtual TreeView and Delphi, and attach a sample compiling project as ZIP to your report that allows to replicate the problem. If only small changes are required, a description is sufficient how a demo projects needs to be changed in order to replicate the bug. If you already have a solution, please supply a patch file.
This bug fix now causes an issue with: IterateSubtree(nil, Callback, nil, [], True, True);
// Skip given node if only the child nodes are requested.
if ChildNodesOnly then
begin
if Node.ChildCount = 0 then
Node := nil
else
Node := GetNextNode(Node); <-- Node must not be the hidden root node.
end;
This bug fix now causes an issue with: terateSubtree(nil, Callback, nil, [], True, True);
I'm sorry, I reverted my commit and tried another fix. Please test if the new code word as expected, @ErwinDenissen and @mksjgj .
The issue on my side is solved.
now, i have time to report a very very old bug in IterateSubtree When you call in this form: ATree.IterateSubtree(nil, ACallback, nil, [], False, True); i mean: Node is nil, and ChildNodesOnly is true Your intention is to traverse the entire tree nodes (except for the Ultra root), but the first tree node will not actually be accessed The reason for this is that there is a problem with the logic of dealing with Node = Nil and Child Nordsenley = True.