Always update the value of generic spin control when leaving it.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 6 May 2010 12:58:27 +0000 (12:58 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 6 May 2010 12:58:27 +0000 (12:58 +0000)
commit5afb019a0c84f48fca79e99446b52866e41c379d
tree3028928428f56c79dfb8af72ff5f9bf4e4a4c168
parentfbf3385651cebd7e029efb01cf7c8eae055fe3f3
Always update the value of generic spin control when leaving it.

We could be left with an invalid value in the control when leaving it. E.g. in
the widgets sample whose double spin control has range from 0 to 10, 123 could
be entered in it and was not replaced by 10 when the control lost focus. This
happened because the code didn't bother to update the text control if its
contents already corresponded to the internally stored value -- but this was
wrong as it could have a different representation.

Just always update the text unconditionally when synchronizing it with the
internal value.

See #12004.

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