]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use a cached best size if the window has a sizer
authorRobert Roebling <robert@roebling.de>
Fri, 30 Jan 2009 20:08:14 +0000 (20:08 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 30 Jan 2009 20:08:14 +0000 (20:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/window.h
src/common/wincmn.cpp

index 9ae3e478484afb58e2da1265d7dee18b49f48d58..06d52fc8351e41e278da2ab401412acc05cbd7f9 100644 (file)
@@ -374,12 +374,8 @@ public:
         // get the size best suited for the window (in fact, minimal
         // acceptable size using which it will still look "nice" in
         // most situations)
-    wxSize GetBestSize() const
-    {
-        if (m_bestSizeCache.IsFullySpecified())
-            return m_bestSizeCache;
-        return DoGetBestSize();
-    }
+    wxSize GetBestSize() const;
+    
     void GetBestSize(int *w, int *h) const
     {
         wxSize s = GetBestSize();
index 5bb116f600727bcf6f5334430692e3ac2e7cfed2..96e14509b3c36cea863684de721161192c8408ee 100644 (file)
@@ -47,6 +47,8 @@
     #include "wx/menu.h"
 #endif //WX_PRECOMP
 
+#include "wx/collpane.h"
+
 #if wxUSE_DRAG_AND_DROP
     #include "wx/dnd.h"
 #endif // wxUSE_DRAG_AND_DROP
@@ -720,6 +722,13 @@ wxSize wxWindowBase::GetEffectiveMinSize() const
     return min;
 }
 
+wxSize wxWindowBase::GetBestSize() const
+{
+    if ((!m_windowSizer) && (m_bestSizeCache.IsFullySpecified()))
+        return m_bestSizeCache;
+        
+    return DoGetBestSize();
+}
 
 void wxWindowBase::SetMinSize(const wxSize& minSize)
 {