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