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