Fix disposing wxComboBox with data objects

Under wxOSX the order of calls to wxItemContainer::Clear()
and wxTextEntry::Clear() matters.
Number of data objects to delete in wxItemContainer::Clear()
is obtained by call to wxComboBox::Count(). Counter of items
in wxComboBox is reset by wxTextEntry()::Clear()
so this method has to be called after wxItemContainer::Clear().

Closes #18768.
This commit is contained in:
Artur Wieczorek 2020-05-24 19:11:05 +02:00
parent 2c62ac41c1
commit 8ebdf2c798

View File

@ -35,8 +35,8 @@ public:
// override these methods to disambiguate between two base classes versions
virtual void Clear() wxOVERRIDE
{
wxTextEntry::Clear();
wxItemContainer::Clear();
wxTextEntry::Clear();
}
// IsEmpty() is ambiguous because we inherit it from both wxItemContainer