Skip to content

Commit ad2226d

Browse files
René HoffmannRené Hoffmann
authored andcommitted
revised methods 'GetNextVisible[NoInit]' and 'GetPreviousVisible[NoInit]' completely to ensure a node cannot be returned as its own next or previous node
- updated methods 'TBaseVirtualTree.GetNextVisible' and 'TBaseVirtualTree.GetNextVisibleNoInit' as well as 'TBaseVirtualTree.GetPreviousVisible' and 'TBaseVirtualTree.GetPreviousVisibleNoInit' to harmonize the determination of a next or previous visible node - used method 'TBaseVirtualTree.GetTopInvisibleParent' to optimize the search by skipping effectively non-visible subtrees as a whole independent from 'ChildrenAbove' mode - applied the condition to force searching for another node from 'TBaseVirtualTree.GetNextVisible' and 'TBaseVirtualTree.GetNextVisibleNoInit' to 'TBaseVirtualTree.GetPreviousVisible' and 'TBaseVirtualTree.GetPreviousVisibleNoInit' - extended that condition to force searching for another node when the current node is known to be in an effectively non-visible subtree - thus, the input node cannot be returned as its own next/previous visible node, which is ensured with an assertion at the end of each method - note that the usage of other methods obscuring the traversal algorithm, such as 'GetVisibleParent', 'GetFirstVisible', 'GetLastVisible', 'GetPreviousSibling', etc. is avoided
1 parent 347afae commit ad2226d

File tree

1 file changed

+352
-323
lines changed

1 file changed

+352
-323
lines changed

0 commit comments

Comments
 (0)