deprecated wxSizerItem::IsShown() because it doesn't really make sense for the sizers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-02-08 22:22:51 +00:00
parent e64658ed99
commit f303d69f93
4 changed files with 30 additions and 22 deletions

View File

@@ -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);