Fix of #1800
This commit is contained in:
parent
9021f84eac
commit
3d731bc570
1 changed files with 2 additions and 2 deletions
|
@ -464,7 +464,7 @@ void SpinCtrl::BUILD() {
|
||||||
// # As a workaround, we get the new value from $event->GetString and store
|
// # As a workaround, we get the new value from $event->GetString and store
|
||||||
// # here temporarily so that we can return it from $self->get_value
|
// # here temporarily so that we can return it from $self->get_value
|
||||||
std::string value = e.GetString().utf8_str().data();
|
std::string value = e.GetString().utf8_str().data();
|
||||||
if (is_matched(value, "^\\d+$"))
|
if (is_matched(value, "^\\-?\\d+$"))
|
||||||
tmp_value = std::stoi(value);
|
tmp_value = std::stoi(value);
|
||||||
else tmp_value = -9999;
|
else tmp_value = -9999;
|
||||||
#ifdef __WXOSX__
|
#ifdef __WXOSX__
|
||||||
|
@ -480,7 +480,7 @@ void SpinCtrl::BUILD() {
|
||||||
|
|
||||||
void SpinCtrl::propagate_value()
|
void SpinCtrl::propagate_value()
|
||||||
{
|
{
|
||||||
if (tmp_value < 0)
|
if (tmp_value == -9999)
|
||||||
on_kill_focus();
|
on_kill_focus();
|
||||||
else if (boost::any_cast<int>(m_value) != tmp_value)
|
else if (boost::any_cast<int>(m_value) != tmp_value)
|
||||||
on_change_field();
|
on_change_field();
|
||||||
|
|
Loading…
Add table
Reference in a new issue