- m_items.Insert(item, pos);
- m_clientData.Insert(NULL, pos);
+ const unsigned int count = items.GetCount();
+
+ m_items.Insert(wxEmptyString, pos, count);
+ m_HTMLclientData.Insert(NULL, pos, count);
+
+ for ( unsigned int i = 0; i < count; ++i, ++pos )
+ {
+ m_items[pos] = items[i];
+ AssignNewItemClientData(pos, clientData, i, type);
+ }
+