I think I see what's going on -- tooltip setup happens after Init(), which means after the initial mSelectedItem is determined. However, as part of tooltip setup, it deletes MenuItems that represent tooltips or tooltip configuration data. So right after Init() returns, the menu structure looks like this:
Code: Select all
[0] TooltipGeometry
[1] TooltipAppearance
[2] StaticText
[3] Option <- mSelectedItem = 3
[4] Tooltip
[5] Option
[6] Tooltip
[7] Option
[8] Tooltip
but by the time the menu actually displays, the tooltip processor has extracted all those tooltip pseudo-items into its own internal data structures and boiled things down to the real menu:
Code: Select all
[0] StaticText
[1] Option
[2] Option
[3] Option <- mSelectedItem = 3
which means that mSelectedItem now points further down in the menu than it should. Depending on the menu, this can result in it pointing to the wrong item, or to a non-selectable item, or to an invisible item off to the side of the screen -- the possibilities are endless!
I should have a fix out later today; it's just a matter of saving the MenuItem that mSelectedItem points to
before beginning tooltip processing, and afterwards, trying to find it again in the list of menu items.