]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/slider.cpp
Fix recreating of wxBitmapComboBox using untyped client data.
[wxWidgets.git] / src / os2 / slider.cpp
index b15c673c1e14c0ea57c2e67bbbac23586b237b5f..5537d730c06c39aba360d388ebf5c9e3ed968675 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      David Webster
 // Modified by:
 // Created:     10/15/99
-// RCS-ID:      $Id$
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -881,7 +880,6 @@ int wxSlider::GetValue() const
                                                                            )
                                                               );
     double                          dPixelToRange = (double)(nPixelRange - m_nThumbLength)/(double)(m_nRangeMax - m_nRangeMin);
-    int                             nNewPos = 0;
     int                             nPixelPos = SHORT1FROMMR(::WinSendMsg( GetHwnd()
                                                                           ,SLM_QUERYSLIDERINFO
                                                                           ,MPFROM2SHORT( SMA_SLIDERARMPOSITION
@@ -890,7 +888,7 @@ int wxSlider::GetValue() const
                                                                           ,(MPARAM)0
                                                                          )
                                                             );
-    nNewPos = (int)(nPixelPos/dPixelToRange);
+    int nNewPos = (int)(nPixelPos/dPixelToRange);
     if (nNewPos > (m_nRangeMax - m_nRangeMin)/2)
         nNewPos++;
     return nNewPos;
@@ -972,7 +970,7 @@ bool wxSlider::OS2OnScroll( int    WXUNUSED(nOrientation),
     vEvent.SetEventObject(this);
     HandleWindowEvent(vEvent);
 
-    wxCommandEvent vCevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
+    wxCommandEvent vCevent( wxEVT_SLIDER, GetId() );
 
     vCevent.SetInt(nNewPos);
     vCevent.SetEventObject(this);