Set proper value of wxSpinEvent generated by wxSpinCtrl

Current way of converting wxSpinCtrl value to integer does not work
for negative values. We can just use here integer value returned
by GetValue().

Closes #18802.
This commit is contained in:
Artur Wieczorek
2020-06-30 19:20:15 +02:00
parent c8124b691f
commit 5a676ac855

View File

@@ -652,7 +652,7 @@ void wxSpinCtrl::DoSendEvent()
{
wxSpinEvent event( wxEVT_SPINCTRL, GetId());
event.SetEventObject( this );
event.SetPosition((int)(m_value + 0.5)); // FIXME should be SetValue
event.SetPosition(GetValue());
event.SetString(m_textCtrl->GetValue());
GetEventHandler()->ProcessEvent( event );
}