Don't send unnecessary events when wxSpinCtrlDouble loses focus

Only send the event when the control loses focus if its value has really
changed.

See https://github.com/wxWidgets/wxWidgets/pull/436

(cherry picked from commit 5e24bd162c)
This commit is contained in:
tommash
2017-03-15 12:37:00 +01:00
committed by Vadim Zeitlin
parent 3fa996453f
commit e1a6857d5a

View File

@@ -432,8 +432,8 @@ void wxSpinCtrlGenericBase::OnSpinButton(wxSpinEvent& event)
void wxSpinCtrlGenericBase::OnTextLostFocus(wxFocusEvent& event)
{
SyncSpinToText(SendEvent_Text);
DoSendEvent();
if ( SyncSpinToText(SendEvent_Text) )
DoSendEvent();
event.Skip();
}