]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
Apply patch [ 1554746 ] wxXmlNode::InsertChild fix
[wxWidgets.git] / src / msw / spinctrl.cpp
index 67083e3f1e7a5c74f9e6c229e659663df9c4f1ae..58673b0e3b38931d4213247b5da8eb40f459a7b2 100644 (file)
 #include "wx/spinctrl.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/event.h"
     #include "wx/textctrl.h"
 #endif
 
 #include "wx/msw/private.h"
-#include "wx/msw/wrapcctl.h"
 
 #if wxUSE_TOOLTIPS
     #include "wx/tooltip.h"
@@ -253,8 +253,8 @@ void wxSpinCtrl::OnChar(wxKeyEvent& event)
 
 void wxSpinCtrl::OnKillFocus(wxFocusEvent& event)
 {
-    // ensure that the value is shown correctly
-    SetValue(GetValue()) ;
+    // ensure that a correct value is shown by the control
+    NormalizeValue();
     event.Skip();
 }