From: Stefan Csomor Date: Wed, 30 Mar 2005 07:53:48 +0000 (+0000) Subject: applying OSAF patch for "toolbar selection not correct on Mac after calling Realize... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8f2ee25db4652f96f28bc8f8370bebc974e533ff applying OSAF patch for "toolbar selection not correct on Mac after calling Realize a 2nd time" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 1f5403adb3..91d3f6f47f 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -436,6 +436,21 @@ bool wxToolBar::Realize() DoToggleTool(tool, true); } } + else if (tool->IsToggled()) + { + 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(); + } + } isRadio = TRUE; } else