]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
fixed incorrectly inversed test for parent [not] being deleted (patch 1624472)
[wxWidgets.git] / src / msw / spinctrl.cpp
index 8f4bd81c896034bc9b94088593fc03be62d1f794..80d15e665b62ac9770a796385deadfde525da2ab 100644 (file)
@@ -391,7 +391,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
         sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     }
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     (void)::ShowWindow(GetBuddyHwnd(), SW_SHOW);
 
@@ -449,6 +449,8 @@ void  wxSpinCtrl::SetValue(int val)
         // current value in the control, so do it manually
         ::SetWindowText(GetBuddyHwnd(), wxString::Format(_T("%d"), val));
     }
+    
+    m_oldValue = GetValue();
 }
 
 int wxSpinCtrl::GetValue() const