]> git.saurik.com Git - wxWidgets.git/commitdiff
Further correction in case where string value is omitted
authorJulian Smart <julian@anthemion.co.uk>
Fri, 16 Mar 2007 08:13:14 +0000 (08:13 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 16 Mar 2007 08:13:14 +0000 (08:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/spinctrl.cpp

index 014e50d81cf576ba311072fbe332d26efef7a9d5..99c513d9d2ce3f227ef7da72a73ed499ae74d3c1 100644 (file)
@@ -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