Don't send unnecessary events when wxSpinCtrlDouble loses focus

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

Closes https://github.com/wxWidgets/wxWidgets/pull/436
This commit is contained in:
tommash
2017-03-15 12:37:00 +01:00
committed by Vadim Zeitlin
parent d5c46e87a6
commit 5e24bd162c

View File

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