+void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool)
+{
+ wxCHECK_RET( tool, _T("NULL tool in wxToolBarTool::UnToggleRadioGroup") );
+
+ if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
+ return;
+
+ wxToolBarToolsList::compatibility_iterator node = m_tools.Find(tool);
+ wxCHECK_RET( node, _T("invalid tool in wxToolBarTool::UnToggleRadioGroup") );
+
+ wxToolBarToolsList::compatibility_iterator nodeNext = node->GetNext();
+ while ( nodeNext )
+ {
+ wxToolBarToolBase *tool = nodeNext->GetData();
+
+ if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
+ break;
+
+ if ( tool->Toggle(false) )
+ {
+ DoToggleTool(tool, false);
+ }
+
+ nodeNext = nodeNext->GetNext();
+ }
+
+ wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
+ while ( nodePrev )
+ {
+ wxToolBarToolBase *tool = nodePrev->GetData();
+
+ if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
+ break;
+
+ if ( tool->Toggle(false) )
+ {
+ DoToggleTool(tool, false);
+ }
+
+ nodePrev = nodePrev->GetPrevious();
+ }
+}
+