]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Line-up interfaces to use size_t for GetCount()s.
[wxWidgets.git] / src / common / wincmn.cpp
index 7b458dca638c885bbfdb2fc8bdaeed5ba1bb4596..3f0393a3e120a51fe50fdadbd2fe1372db22115d 100644 (file)
@@ -446,8 +446,10 @@ void wxWindowBase::InvalidateBestSize()
     m_bestSizeCache = wxDefaultSize;
 
     // parent's best size calculation may depend on its children's
-    // best sizes, so let's invalidate it as well to be safe:
-    if (m_parent)
+    // as long as child window we are in is not top level window itself
+    // (because the TLW size is never resized automatically)
+    // so let's invalidate it as well to be safe:
+    if (m_parent && !IsTopLevel())
         m_parent->InvalidateBestSize();
 }