avoiding assertion on macOS in wxOwnerDrawnComboBox::DoClear

wxTextEntry on macOS is calling GetEditableWindow to arrive at the native text entry view, which in this case fails, so route things directly
This commit is contained in:
Stefan Csomor 2020-07-04 15:05:17 +02:00
parent 3c87ffdaec
commit 81e3760e4a

View File

@ -988,7 +988,14 @@ void wxOwnerDrawnComboBox::DoClear()
// There is no text entry when using wxCB_READONLY style, so test for it.
if ( GetTextCtrl() )
{
#ifdef __WXOSX__
// this has to be rerouted to the text control explicitly on macOS
GetTextCtrl()->Clear();
#else
wxTextEntry::Clear();
#endif
}
}
void wxOwnerDrawnComboBox::Clear()