X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4235f9f6c601cae95fc74a663b1dc47c40c21582..779e28da630ef9fba6441fb0bab01cd538a7e7bb:/src/msw/slider.cpp diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index 747d5e309b..23e8f0ac87 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -175,7 +175,7 @@ bool wxSlider::Create(wxWindow *parent, // and initialize everything SetRange(minValue, maxValue); SetValue(value); - SetPageSize((maxValue - minValue)/10); + SetPageSize( wxMax(1, (maxValue - minValue)/10) ); // we need to position the labels correctly if we have them and if // SetSize() hadn't been called before (when best size was determined by