]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/radiobox.cpp
Applied patch [ 1776951 ] wxSizer::GetContainingWindow fails for nested sizers
[wxWidgets.git] / src / mac / carbon / radiobox.cpp
index fb9a2b6efc0693a1760f651ed4f4ae97d133a1a6..68ad272a3c62648b4284ca4512f7212c0fcdf9de 100644 (file)
@@ -17,9 +17,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/radiobut.h"
+    #include "wx/arrstr.h"
 #endif
 
-#include "wx/arrstr.h"
 #include "wx/mac/uma.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
@@ -107,7 +107,7 @@ bool wxRadioBox::Create( wxWindow *parent,
 
     SetMajorDim( majorDim == 0 ? n : majorDim, style );
 
-    m_label = label;
+    m_labelOrig = m_label = label;
 
     Rect bounds = wxMacGetBoundsForControl( this, pos, size );
     if ( bounds.right <= bounds.left )
@@ -128,7 +128,7 @@ bool wxRadioBox::Create( wxWindow *parent,
         wxRadioButton *radBtn = new wxRadioButton(
             this,
             wxID_ANY,
-            wxStripMenuCodes(choices[i]),
+            GetLabelText(choices[i]),
             wxPoint( 5, 20 * i + 10 ),
             wxDefaultSize,
             i == 0 ? wxRB_GROUP : 0 );
@@ -321,14 +321,11 @@ void wxRadioBox::Command( wxCommandEvent& event )
 //
 void wxRadioBox::SetFocus()
 {
-    int i;
     wxRadioButton *current;
 
-    i = 0;
     current = m_radioButtonCycle;
     while (!current->GetValue())
     {
-        i++;
         current = current->NextInCycle();
     }