X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/978af864269a739e77d9431c8465435e3f8f7407..80a779275ae04443c568dca919adb26cf6f5002c:/src/common/sizer.cpp?ds=inline diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index ed390865d6..a691f6431c 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -27,6 +27,7 @@ #include "wx/settings.h" #include "wx/button.h" #include "wx/statbox.h" + #include "wx/toplevel.h" #endif // WX_PRECOMP #include "wx/listimpl.cpp" @@ -353,6 +354,11 @@ void wxSizerItem::SetDimension( const wxPoint& pos_, const wxSize& size_ ) 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 )