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:
@@ -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 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user