X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..9ceed261f809dacf8f64c2287c5de9e45d22e5cb:/src/generic/spinctlg.cpp diff --git a/src/generic/spinctlg.cpp b/src/generic/spinctlg.cpp index d36608adc4..d3c1cdb4a6 100644 --- a/src/generic/spinctlg.cpp +++ b/src/generic/spinctlg.cpp @@ -279,6 +279,12 @@ void wxSpinCtrlGenericBase::DoMoveWindow(int x, int y, int width, int height) // operations forwarded to the subcontrols // ---------------------------------------------------------------------------- +void wxSpinCtrlGenericBase::SetFocus() +{ + if ( m_textCtrl ) + m_textCtrl->SetFocus(); +} + bool wxSpinCtrlGenericBase::Enable(bool enable) { // Notice that we never enable this control itself, it must stay disabled @@ -561,6 +567,11 @@ void wxSpinCtrlDouble::SetDigits(unsigned digits) { wxCHECK_RET( digits <= 20, "too many digits for wxSpinCtrlDouble" ); + if ( digits == m_digits ) + return; + + m_digits = digits; + m_format.Printf(wxT("%%0.%ulf"), digits); DoSetValue(m_value);