Reset wxSpinCtrl value to GetMin() if text string is invalid
Previously, wxSpinCtrl (using native control) and wxSpinCtrlDouble (using the generic implementation) behaved differently in this case, with the former changing its value but the latter keeping the last valid value instead. Make them behave the same by resetting the value in both cases and document this behaviour.
This commit is contained in:
@@ -278,6 +278,7 @@ TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Value", "[spinctrl]")
|
||||
|
||||
m_spin->SetValue("");
|
||||
CHECK( m_spin->GetTextValue() == "" );
|
||||
CHECK( m_spin->GetValue() == 0 );
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Base", "[spinctrl]")
|
||||
|
Reference in New Issue
Block a user