From c8fb50b7945492de005090f5f5b2bf9941a34071 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 21 Jan 2012 17:03:52 +0000 Subject: [PATCH] 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 --- include/wx/generic/spinctlg.h | 1 - src/generic/spinctlg.cpp | 11 ----------- 2 files changed, 12 deletions(-) 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) { -- 2.45.2