Fixed bug #9856: wxSizer::Replace( size_t, wxSizerItem *) doesn't call SetContainingSizer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2011-02-17 09:53:06 +00:00
parent e5ada8e1aa
commit e723991bb0

View File

@ -840,6 +840,10 @@ bool wxSizer::Replace( size_t old, wxSizerItem *newitem )
wxSizerItem *item = node->GetData();
node->SetData(newitem);
if (item->IsWindow() && item->GetWindow())
item->GetWindow()->SetContainingSizer(NULL);
delete item;
return true;