]> git.saurik.com Git - wxWidgets.git/commitdiff
IsShown shouldn't cause empty sizers to not have their positions calculated
authorJulian Smart <julian@anthemion.co.uk>
Fri, 16 Feb 2007 22:12:58 +0000 (22:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 16 Feb 2007 22:12:58 +0000 (22:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/sizer.cpp

index d4ac29a51747c1e056d3208a12f769c51e357d6e..84473ce9ccde1759eb8c5755304b2abb0fd83b23 100644 (file)
@@ -460,6 +460,11 @@ bool wxSizerItem::IsShown() const
             // shown, so are we (this arbitrariness is the reason for
             // deprecating this function)
             {
+                // Some apps (such as dialog editors) depend on an empty sizer still
+                // being laid out correctly and reporting the correct size and position.
+                if (m_sizer->GetChildren().GetCount() == 0)
+                    return true;
+
                 for ( wxSizerItemList::compatibility_iterator
                         node = m_sizer->GetChildren().GetFirst();
                       node;