Preserve value when changing range of inverted wxSlider in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 13 Dec 2010 18:10:02 +0000 (18:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 13 Dec 2010 18:10:02 +0000 (18:10 +0000)
commitd383f40e7bfc95421d71e0b804bafa8054cd5f01
treed8c78ea51efe48d2c0592acd2b8e34df28de9e91
parentbac635ede250066fffeaa96c6c78cafd4e761fd6
Preserve value when changing range of inverted wxSlider in wxMSW.

The logical value of wxSlider was changed when its range was changed in wxMSW
if the slider had wxSL_INVERSE style because the logical value was actually
computed using the range and the actual physical control value and we forgot
to update the latter when changing the range.

Do update it now in SetRange() to fix this.

Also add unit tests checking for this and, more generally, for other
operations with inversed sliders.

Closes #12765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/slider.cpp
tests/controls/slidertest.cpp