From: Vadim Zeitlin Date: Sat, 21 Jan 2012 17:03:52 +0000 (+0000) Subject: Fix reparenting generic wxSpinCtrl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c8fb50b7945492de005090f5f5b2bf9941a34071 Fix reparenting generic wxSpinCtrl. The existing Reparent() implementation was wrong as it reparented spin control subwindows under the new parent but left the main window itself under the old one. Fix this by just not overriding Reparent() at all, the inherited version works just fine for this control. Closes #13849. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 62d2268eff..a8dad8de5c 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -81,7 +81,6 @@ public: // forward these functions to all subcontrols virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); - virtual bool Reparent(wxWindowBase *newParent); #if wxUSE_TOOLTIPS virtual void DoSetToolTip(wxToolTip *tip); #endif // wxUSE_TOOLTIPS diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index 615e64ea24..9a2a5eb4e4 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -323,17 +323,6 @@ bool wxSpinCtrlGenericBase::Show(bool show) return true; } -bool wxSpinCtrlGenericBase::Reparent(wxWindowBase *newParent) -{ - if ( m_spinButton ) - { - m_spinButton->Reparent(newParent); - m_textCtrl->Reparent(newParent); - } - - return true; -} - #if wxUSE_TOOLTIPS void wxSpinCtrlGenericBase::DoSetToolTip(wxToolTip *tip) {