Fix incorrect scroll positions used in SetScrollbars().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Jan 2012 11:28:12 +0000 (11:28 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Jan 2012 11:28:12 +0000 (11:28 +0000)
commit7fa7e46b265964e2d22ce97e300d5d45cd851da1
tree1ca121433011061ee67653fcdd86a01c9a005be9
parent8ca4b822b957f847cee03c358f4ed8321294dd6c
Fix incorrect scroll positions used in SetScrollbars().

SetScrollbars() passed its input positions expressed in scroll units to
CalcUnscrolledPosition() which takes positions in pixels. This was definitely
wrong so don't do this and perform the conversion from scroll units to pixels
in SetScrollbars() itself for clarity instead.

It's not clear what concrete bugs, if any, does this fix as the calculated
positions are almost never used anyhow but the old code was obviously
incorrect and the new version has a chance of not being wrong so it's already
an improvement.

Closes #9988.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/scrlwing.cpp