Fix displaying wxSpinCtrlDouble values with default precision
For the sake of consistency with native wxGTK implementation, spin control value should be displayed with fixed precision. See #17085.
This commit is contained in:
parent
19da5f61bb
commit
edc553870f
@ -420,7 +420,7 @@ private:
|
||||
void Init()
|
||||
{
|
||||
m_digits = 0;
|
||||
m_format = wxS("%g");
|
||||
m_format = "%0.0f";
|
||||
}
|
||||
|
||||
wxString m_format;
|
||||
|
@ -199,7 +199,7 @@ void SpinCtrlDoubleTestCase::Increment()
|
||||
#if wxUSE_UIACTIONSIMULATOR
|
||||
CPPUNIT_ASSERT_EQUAL(1.0, m_spin->GetIncrement());
|
||||
|
||||
m_spin->SetDigits(1); // GTK would fail without this.
|
||||
m_spin->SetDigits(1);
|
||||
m_spin->SetIncrement(0.1);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(0.1, m_spin->GetIncrement());
|
||||
|
Loading…
Reference in New Issue
Block a user