]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
rebaked after addition of XRC handler for richtext control
[wxWidgets.git] / src / common / sizer.cpp
index 9d6d50de0b35cfc962d559c30ffbdf2039dc65c0..3429e7b01f2205751fd54b25bba9f55a55536029 100644 (file)
@@ -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 )