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:
parent
3c87ffdaec
commit
81e3760e4a
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user