Update wxSpinCtrlDouble::m_digits in its SetDigits().

We need to update the internally stored information about the number of digits
we use and not just update the control appearance accordingly.

Also don't do anything at all when the number of digits didn't really change.

Closes #12260.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-07-22 12:16:19 +00:00
parent 888cb61e21
commit 9bce7b7b13

View File

@ -561,6 +561,11 @@ void wxSpinCtrlDouble::SetDigits(unsigned digits)
{
wxCHECK_RET( digits <= 20, "too many digits for wxSpinCtrlDouble" );
if ( digits == m_digits )
return;
m_digits = digits;
m_format.Printf(wxT("%%0.%ulf"), digits);
DoSetValue(m_value);