Keep client data in sync when deleting items from wxOSX wxComboBox.

Correspondence between item indices and their client data was broken if any
items were deleted or the combobox was cleared entirely. Fix this by updating
the client data array whenever this happens.

Closes #14147.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2012-07-02 15:03:08 +00:00
parent 4b0bf080e1
commit d8c0d15d32

View File

@ -131,11 +131,13 @@ unsigned int wxComboBox::GetCount() const
void wxComboBox::DoDeleteOneItem(unsigned int n)
{
m_datas.RemoveAt(n);
GetComboPeer()->RemoveItem(n);
}
void wxComboBox::DoClear()
{
m_datas.Clear();
GetComboPeer()->Clear();
}