ScrollLines() didn't use correct step_increment, so e.g. wxTextCtrl scrolled in tiny steps instead of by lines

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-08-19 10:05:59 +00:00
parent 4bded47dea
commit 4e9be62bb3

View File

@ -3653,7 +3653,7 @@ bool wxWindowGTK::ScrollLines(int lines)
{
GtkAdjustment* adj = range->adjustment;
const int pos = int(adj->value + 0.5);
gtk_range_set_value(range, pos + lines);
gtk_range_set_value(range, pos + lines*adj->step_increment);
changed = pos != int(adj->value + 0.5);
}
return changed;
@ -3667,7 +3667,7 @@ bool wxWindowGTK::ScrollPages(int pages)
{
GtkAdjustment* adj = range->adjustment;
const int pos = int(adj->value + 0.5);
gtk_range_set_value(range, pos + pages * adj->page_size);
gtk_range_set_value(range, pos + pages*adj->page_increment);
changed = pos != int(adj->value + 0.5);
}
return changed;