From: Julian Smart Date: Fri, 16 Mar 2007 08:13:14 +0000 (+0000) Subject: Further correction in case where string value is omitted X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5bcdac458c0d5bff7c499ae3c2b7cba40c4ad802?ds=inline Further correction in case where string value is omitted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 014e50d81c..99c513d9d2 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -409,6 +409,12 @@ bool wxSpinCtrl::Create(wxWindow *parent, if ( !value.empty() ) { SetValue(value); + m_oldValue = (int) wxAtol(value); + } + else + { + SetValue(wxString::Format(wxT("%d"), initial)); + m_oldValue = initial; } // do it after finishing with m_hwndBuddy creation to avoid generating