+ if (tool->kind == wxITEM_RADIO)
+ {
+ int i, idx, count;
+ idx = GetToolIndex(tool_id);
+ count = (int)m_items.GetCount();
+
+ if (idx >= 0 && idx < count)
+ {
+ for (i = idx; 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--)
+ {
+ if (m_items[i].kind != wxITEM_RADIO)
+ break;
+ m_items[i].state &= ~wxAUI_BUTTON_STATE_CHECKED;
+ }
+ }