From: Julian Smart Date: Fri, 16 Feb 2007 22:12:58 +0000 (+0000) Subject: IsShown shouldn't cause empty sizers to not have their positions calculated X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/29392c81aaf80dcabaab135a1eca64ff4c97092e?hp=b2df5ddf6a575a5c0d84f76f1f84c456679ce7d6 IsShown shouldn't cause empty sizers to not have their positions calculated git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index d4ac29a517..84473ce9cc 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -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;