X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c81394808bf7efd84e4294e44a9a9a7b7f6dd8a9..59859d3da18244fa31f82c30ded14f619c3c967f:/src/generic/spinctlg.cpp?ds=inline diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index e9a7a32a37..9a2a5eb4e4 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -283,16 +283,24 @@ void wxSpinCtrlGenericBase::SetFocus() m_textCtrl->SetFocus(); } +#ifdef __WXMSW__ + +void wxSpinCtrlGenericBase::DoEnable(bool enable) +{ + // We never enable this control itself, it must stay disabled to avoid + // interfering with the siblings event handling (see e.g. #12045 for the + // kind of problems which arise otherwise). + if ( !enable ) + wxSpinCtrlBase::DoEnable(enable); +} + +#endif // __WXMSW__ + bool wxSpinCtrlGenericBase::Enable(bool enable) { - // Notice that we never enable this control itself, it must stay disabled - // to avoid interfering with the siblings event handling (see e.g. #12045 - // for the kind of problems which arise otherwise). - if ( enable == m_isEnabled ) + if ( !wxSpinCtrlBase::Enable(enable) ) return false; - m_isEnabled = enable; - m_spinButton->Enable(enable); m_textCtrl->Enable(enable); @@ -315,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) {