]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/radiobut.cpp
Remove my binary compatibility stuff from HEAD. Patch #1367014 used for reference.
[wxWidgets.git] / src / mac / carbon / radiobut.cpp
index e7f983642d55e9dd4cfb6615a4892925ece4dea5..936b8a54e8a5d11f92cae10e3f1a02e615df023f 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "radiobut.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #if wxUSE_RADIOBTN
@@ -72,6 +68,11 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
     return true;
 }
 
+wxRadioButton::~wxRadioButton()
+{
+    RemoveFromCycle();
+}
+
 void wxRadioButton::SetValue(bool val)
 {
     wxRadioButton *cycle;
@@ -150,4 +151,20 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle)
     }
 }
 
+void wxRadioButton::RemoveFromCycle()
+{        
+    if (m_cycle==NULL || m_cycle == this)
+    {
+        return;
+    }
+    else
+    {
+        // Find the previous one and make it point to the next one
+        wxRadioButton* prev = this;
+        while (prev->m_cycle != this)
+            prev = prev->m_cycle;
+        prev->m_cycle = m_cycle;
+    }
+}
+
 #endif