Avoid GTK warnings when calling Clear() on a wxBitmapComboBox
Use wxTextEntry::Clear(), now that it uses Remove() instead of SetValue().
See #16654 and fc8d3f6
This commit is contained in:
@@ -297,12 +297,7 @@ wxComboBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
|
|||||||
|
|
||||||
void wxComboBox::Clear()
|
void wxComboBox::Clear()
|
||||||
{
|
{
|
||||||
// Do not call wxTextEntry::Clear() here as it's implemented in terms of
|
wxTextEntry::Clear();
|
||||||
// virtual SetValue() and so would call our own overridden version of this
|
|
||||||
// method, which wouldn't do the right thing in wxCB_READONLY case.
|
|
||||||
//
|
|
||||||
// Clear the text directly to avoid this.
|
|
||||||
wxTextEntry::SetValue(wxString());
|
|
||||||
wxItemContainer::Clear();
|
wxItemContainer::Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user