Further correction in case where string value is omitted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-03-16 08:13:14 +00:00
parent 29435411cb
commit 25a07ef892

View 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