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:
@@ -420,7 +420,7 @@ private:
|
|||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
m_digits = 0;
|
m_digits = 0;
|
||||||
m_format = wxS("%g");
|
m_format = "%0.0f";
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString m_format;
|
wxString m_format;
|
||||||
|
@@ -199,7 +199,7 @@ void SpinCtrlDoubleTestCase::Increment()
|
|||||||
#if wxUSE_UIACTIONSIMULATOR
|
#if wxUSE_UIACTIONSIMULATOR
|
||||||
CPPUNIT_ASSERT_EQUAL(1.0, m_spin->GetIncrement());
|
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);
|
m_spin->SetIncrement(0.1);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(0.1, m_spin->GetIncrement());
|
CPPUNIT_ASSERT_EQUAL(0.1, m_spin->GetIncrement());
|
||||||
|
Reference in New Issue
Block a user