X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20a1eea1fd93719fecec5fc44a408b0fc4e3cf33..24bcaec36746abeeb9e2023d03e3ab4289006fc3:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 8e3d5e4634..2641125c24 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1185,9 +1185,9 @@ void wxWindowBase::DeleteRelatedConstraints() } #endif -void wxWindowBase::SetSizer(wxSizer *sizer) +void wxWindowBase::SetSizer(wxSizer *sizer, bool deleteOld) { - if (m_windowSizer) delete m_windowSizer; + if (m_windowSizer && deleteOld) delete m_windowSizer; m_windowSizer = sizer; } @@ -1748,3 +1748,4 @@ void wxWindowBase::ReleaseMouse() GetCapture()); } +// vi:sts=4:sw=4:et