X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/src/gtk/slider.cpp?ds=sidebyside diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 6440262ee4..f14ae6394a 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -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;