]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/slider.cpp
Fix duplicate wxContextMenuEvent generation in wxMSW.
[wxWidgets.git] / src / os2 / slider.cpp
index b15c673c1e14c0ea57c2e67bbbac23586b237b5f..e74e38ac5edf7920f1ce1ab3dbcc10e41edecaa8 100644 (file)
@@ -881,7 +881,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 +889,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 +971,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);