]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobut.cpp
fix Borland bug http://news.gmane.org/find-root.php?message_id=%3c43A0B07F.8010204...
[wxWidgets.git] / src / gtk / radiobut.cpp
index d6440f577a06ca8c03040aaa2d027e1a58448689..9d0f498faef74cdd913088b11d0c577a505a92de 100644 (file)
@@ -83,12 +83,8 @@ bool wxRadioButton::Create( wxWindow *parent,
         return FALSE;
     }
 
-    if (HasFlag(wxRB_GROUP))
-    {
-        // start a new group
-        m_radioButtonGroup = (GSList*) NULL;
-    }
-    else
+    GSList* radioButtonGroup = NULL;
+    if (!HasFlag(wxRB_GROUP))
     {
         // search backward for last group start
         wxRadioButton *chief = (wxRadioButton*) NULL;
@@ -107,16 +103,11 @@ bool wxRadioButton::Create( wxWindow *parent,
         if (chief)
         {
             // we are part of the group started by chief
-            m_radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) );
-        }
-        else
-        {
-            // start a new group
-            m_radioButtonGroup = (GSList*) NULL;
+            radioButtonGroup = gtk_radio_button_group( GTK_RADIO_BUTTON(chief->m_widget) );
         }
     }
 
-    m_widget = gtk_radio_button_new_with_label( m_radioButtonGroup, wxGTK_CONV( label ) );
+    m_widget = gtk_radio_button_new_with_label( radioButtonGroup, wxGTK_CONV( label ) );
       
     SetLabel(label);