Now I know that generally there is nothing but hate for the current tree widget implementation, but none the less i have found a bug in it and fixed it.
The function Tree::getNextSelectedItemFromList wouldn't actually find the next selected item if the current selected item was on a different branch of the tree of nested deeper than the next selected one, if that makes sense
![Smile :)](./images/smilies/icon_smile.gif)
This can be fixed quite simply by making the foundStartItem paramater a reference:
Code: Select all
TreeItem* Tree::getNextSelectedItemFromList(const LBItemList &itemList, const TreeItem* startItem, bool& foundStartItem) const
after that items found on a branch will be notified to their recursive parent calls. YAY! This will generate 3 errors from places calling it but that is an easy fix like this:
Code: Select all
bool found = true;
getNextSelectedItemFromList( itemList, startItem, found );
instead of:
Code: Select all
getNextSelectedItemFromList( itemList, startItem, true );
Thanks!