Mark wxTextCtrl dirty before handling event in wxOSX

This fixes behaviour of wxSpinCtrl which otherwise could still use the
old value of its text part when processing spin buttons press.

Closes https://github.com/wxWidgets/wxWidgets/pull/2092
This commit is contained in:
Hartwig
2020-10-18 00:52:22 +02:00
committed by Vadim Zeitlin
parent cd571515cb
commit 19f9f6af57

View File

@@ -2443,7 +2443,10 @@ void wxWidgetCocoaImpl::controlTextDidChange()
wxTextCtrl *tc = wxDynamicCast( wxpeer , wxTextCtrl );
wxComboBox *cb = wxDynamicCast( wxpeer , wxComboBox );
if ( tc )
{
tc->MarkDirty();
tc->SendTextUpdatedEventIfAllowed();
}
else if ( cb )
cb->SendTextUpdatedEventIfAllowed();
else