We incorrectly returned the item we started from instead of invalid item if
there was no match, fix this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72637
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
itemid = GetNext(itemid);
}
{
itemid = GetNext(itemid);
}
- // If we haven't found the item, id.IsOk() will be false, as per
- // documentation
+ // If we haven't found the item but wrapped back to the one we started
+ // from, id.IsOk() must be false
+ if ( itemid == idParent )
+ {
+ itemid = wxTreeItemId();
+ }