X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3824e0db33a024f3ecfda0c22e47d1b14c54732f..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/src/gtk/slider.cpp diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 77db144529..f14ae6394a 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -46,7 +46,7 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType) { wxScrollEvent event( evtType, win->GetId(), value, orient ); event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + win->HandleWindowEvent( event ); } // but, in any case, except if we're dragging the slider (and so the change @@ -55,14 +55,14 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType) { wxScrollEvent event(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient); event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); + win->HandleWindowEvent( event ); } // and also generate a command event for compatibility wxCommandEvent event( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() ); event.SetEventObject( win ); event.SetInt( value ); - win->GetEventHandler()->ProcessEvent( event ); + win->HandleWindowEvent( event ); } static inline wxEventType GtkScrollTypeToWx(int scrollType) @@ -357,6 +357,8 @@ void wxSlider::GTKSetValue(int value) void wxSlider::SetRange( int minValue, int maxValue ) { m_blockScrollEvent = true; + if (minValue == maxValue) + maxValue++; gtk_range_set_range(GTK_RANGE (m_widget), minValue, maxValue); gtk_range_set_increments(GTK_RANGE (m_widget), 1, (maxValue - minValue + 9) / 10); m_blockScrollEvent = false;