X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ec927f89b0e907c45143bb3de0548b97361b6b2..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/gtk/scrolwin.cpp?ds=sidebyside diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 2f0bea636a..2808986822 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -108,15 +108,15 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkRange* range, *linesPerPage = 0; } - // ensure that the scroll position is always in valid range - if ( *pos > *lines ) - *pos = *lines; - GtkAdjustment* adj = range->adjustment; adj->step_increment = 1; adj->page_increment = adj->page_size = page_size; gtk_range_set_range(range, 0, upper); + + // ensure that the scroll position is always in valid range + if (*pos > *lines) + *pos = *lines; } void wxScrollHelperNative::AdjustScrollbars()