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