Fix the condition of the loop in wxAuiToolBar::ToggleTool() to also uncheck
the item with index 0 that was always excluded before because of "i > 0" check
in the loop.
Also exclude the item being turned on itself from the loops, it's useless to
reset its checked state only to turn it on again below.
Closes #11110.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67742
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if (idx >= 0 && idx < count)
{
- for (i = idx; i < count; ++i)
+ for (i = idx + 1; i < count; ++i)
{
if (m_items[i].kind != wxITEM_RADIO)
break;
m_items[i].state &= ~wxAUI_BUTTON_STATE_CHECKED;
}
- for (i = idx; i > 0; i--)
+ for (i = idx - 1; i >= 0; i--)
{
if (m_items[i].kind != wxITEM_RADIO)
break;