From e6cfcc0df2d7ea7a8a584744a699d72612b5443e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 21 Aug 2007 14:08:26 +0000 Subject: [PATCH] Applied patch [ 1776951 ] wxSizer::GetContainingWindow fails for nested sizers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index c8965d7295..1df3fd4885 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -522,6 +522,9 @@ wxSizerItem* wxSizer::Insert( size_t index, wxSizerItem *item ) if ( item->GetWindow() ) item->GetWindow()->SetContainingSizer( this ); + if ( item->GetSizer() ) + item->GetSizer()->SetContainingWindow( m_containingWindow ); + return item; } @@ -1974,7 +1977,7 @@ void wxStdDialogButtonSizer::Realize() Add((wxWindow*)m_buttonNegative, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); } - // according to HIG, in explicit apply windows the order is: + // according to HIG, in explicit apply windows the order is: // [ Help Apply Cancel OK ] if (m_buttonApply) Add((wxWindow*)m_buttonApply, 0, wxALIGN_CENTRE | wxLEFT | wxRIGHT, 3); -- 2.45.2