]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
Fix [ 1574240 ] wx.RadioButton doesn't navigate correctly
[wxWidgets.git] / src / common / sizer.cpp
index ed390865d604d3471cc6f6b798394d6603deb7bd..a691f6431c5af175f8741d922e325819d515c421 100644 (file)
@@ -27,6 +27,7 @@
     #include "wx/settings.h"
     #include "wx/button.h"
     #include "wx/statbox.h"
     #include "wx/settings.h"
     #include "wx/button.h"
     #include "wx/statbox.h"
+    #include "wx/toplevel.h"
 #endif // WX_PRECOMP
 
 #include "wx/listimpl.cpp"
 #endif // WX_PRECOMP
 
 #include "wx/listimpl.cpp"
@@ -353,6 +354,11 @@ void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ )
         size.y -= m_border;
     }
 
         size.y -= m_border;
     }
 
+    if (size.x < 0)
+        size.x = 0;
+    if (size.y < 0)
+        size.y = 0;
+
     m_rect = wxRect(pos, size);
 
     switch ( m_kind )
     m_rect = wxRect(pos, size);
 
     switch ( m_kind )