]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
Fix vertical rules rendering in generic wxDataViewCtrl.
[wxWidgets.git] / src / gtk / radiobox.cpp
index 18f02bf683bcc063733516fac2a17dfaf7574316..3467b72318a8d242c59a48e90a92bcf2b19d9ff6 100644 (file)
 
 #include "wx/radiobox.h"
 
-#ifndef WX_PRECOMP
-    #include "wx/log.h"
-    #include "wx/frame.h"
-    #include "wx/dialog.h"
-#endif
-
 #if wxUSE_TOOLTIPS
     #include "wx/tooltip.h"
 #endif
@@ -428,8 +422,6 @@ void wxRadioBox::SetString(unsigned int item, const wxString& label)
 
 bool wxRadioBox::Enable( bool enable )
 {
-    bool isEnabled = IsEnabled();
-
     if ( !wxControl::Enable( enable ) )
         return false;
 
@@ -444,10 +436,8 @@ bool wxRadioBox::Enable( bool enable )
         node = node->GetNext();
     }
 
-    if (!isEnabled && enable)
-    {
+    if (enable)
         GTKFixSensitivity();
-    }
 
     return true;
 }
@@ -608,7 +598,9 @@ GdkWindow *wxRadioBox::GTKGetWindow(wxArrayGdkWindows& windows) const
     {
         GtkWidget *button = GTK_WIDGET( node->GetData()->button );
 
-        windows.push_back(button->window);
+        // don't put NULL pointers in the 'windows' array!
+        if (button->window)
+            windows.push_back(button->window);
 
         node = node->GetNext();
     }