X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4107600f205d9d4951c0ffaa4aadb1bc2b75dcf2..2fadbbfd128f69cb9922a6938c893ad79b01e749:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 9d6d50de0b..3429e7b01f 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -276,7 +276,7 @@ wxSize wxSizerItem::CalcMin() { // Since the size of the window may change during runtime, we // should use the current minimal/best size. - m_minSize = m_window->GetBestFittingSize(); + m_minSize = m_window->GetEffectiveMinSize(); } return GetMinSizeWithBorder(); @@ -354,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 )