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:
parent
2c62ac41c1
commit
8ebdf2c798
@ -35,8 +35,8 @@ public:
|
|||||||
// override these methods to disambiguate between two base classes versions
|
// override these methods to disambiguate between two base classes versions
|
||||||
virtual void Clear() wxOVERRIDE
|
virtual void Clear() wxOVERRIDE
|
||||||
{
|
{
|
||||||
wxTextEntry::Clear();
|
|
||||||
wxItemContainer::Clear();
|
wxItemContainer::Clear();
|
||||||
|
wxTextEntry::Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsEmpty() is ambiguous because we inherit it from both wxItemContainer
|
// IsEmpty() is ambiguous because we inherit it from both wxItemContainer
|
||||||
|
Loading…
Reference in New Issue
Block a user