Fix setting client data when adding items to a sorted wxListBox, broken in r74317

closes #16290


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-05-26 07:30:42 +00:00
parent 13b55e7796
commit 84d8ef207f
2 changed files with 6 additions and 1 deletions

View File

@@ -623,6 +623,7 @@ wxGTK:
- Fix wxDirPickerCtrl to send wxEVT_DIRPICKER_CHANGED when user selects a
special folder from combobox
- Fix wxSystemSettings::GetColour() returning transparent colors with GTK3.
- Fix setting client data when adding items to a sorted wxListBox.
wxMSW:

View File

@@ -460,9 +460,13 @@ int wxListBox::DoInsertOneItem(const wxString& item, unsigned int pos)
#else
int entryCol = 0;
#endif
gtk_list_store_insert_with_values(m_liststore, NULL, pos, entryCol, entry, -1);
GtkTreeIter iter;
gtk_list_store_insert_with_values(m_liststore, &iter, pos, entryCol, entry, -1);
g_object_unref(entry);
if (HasFlag(wxLB_SORT))
pos = GTKGetIndexFor(iter);
return pos;
}