X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03e11df5470fd64d9d9a669d0b50b84c2d714736..5adad46628e545a6d4172ecf3a0cb848934f5cd0:/src/mac/slider.cpp diff --git a/src/mac/slider.cpp b/src/mac/slider.cpp index 05b29b696a..bce30a4bd1 100644 --- a/src/mac/slider.cpp +++ b/src/mac/slider.cpp @@ -133,7 +133,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, } m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , - title , true , value , minValue , maxValue, + title , false , value , minValue , maxValue, kControlSliderProc + kControlSliderLiveFeedback + ( ( style & wxSL_AUTOTICKS ) ? kControlSliderHasTickMarks : 0 ) , (long) this ) ; wxASSERT_MSG( m_macControl != NULL , "No valid mac control" ) ; @@ -312,20 +312,13 @@ void wxSlider::MacHandleControlClick( ControlHandle control , SInt16 controlpart SetValue( value ) ; wxScrollEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId); - event.SetPosition(GetControlValue( m_macControl) ); + event.SetPosition(value); event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); -#if WXWIN_COMPATIBILITY + wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId ); + cevent.SetInt( value ); + cevent.SetEventObject( this ); - wxEventType oldEvent = event.GetEventType(); - event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED ); - if ( !GetEventHandler()->ProcessEvent(event) ) - { - event.SetEventType( oldEvent ); - if (!GetParent()->GetEventHandler()->ProcessEvent(event)) - event.Skip(); - } -#else - GetEventHandler()->ProcessEvent(event); -#endif + GetEventHandler()->ProcessEvent( cevent ); }