X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a10ea8b13fd0851e71e6fa5ebbe5b93933be11e..86948c99a6f0fd177b09b3db0ef702739ec62a27:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 5db2c30222..b250c0c048 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -447,7 +447,20 @@ bool wxSizerItem::IsShown() const return m_window->IsShown(); case Item_Sizer: - return m_sizer->IsShown(); + // arbitrarily decide that if at least one of our elements is + // shown, so are we (this arbitrariness is the reason for + // deprecating this function) + { + for ( wxSizerItemList::compatibility_iterator + node = m_sizer->GetChildren().GetFirst(); + node; + node = node->GetNext() ) + { + if ( node->GetData()->IsShown() ) + return true; + } + } + return false; case Item_Spacer: return m_spacer->IsShown(); @@ -475,11 +488,6 @@ int wxSizerItem::GetOption() const // wxSizer //--------------------------------------------------------------------------- -wxSizer::wxSizer() -{ - m_isShown = true; -} - wxSizer::~wxSizer() { WX_CLEAR_LIST(wxSizerItemList, m_children);