[SOLVED] Userdata is lost after removeRow (MultiColumnList)
Posted: Thu Dec 29, 2011 20:31
Hi,
after I call removeRow only once on a single row like this;
every listitems userdata in multicolumlist is set to userdata of the one just below it. all listitems are affected by it.
i fill the multicolumnlist like this
in short, userdata of every listbox item below the deleted one are changed.
what i am doing wrong ?
thank you
edit: i'm using cegui 0.7.5 vc++9. problem is present in both debug and relase builds.
after I call removeRow only once on a single row like this;
Code: Select all
for(uint j=0; j < bag->getRowCount(); ++j)
{
CEGUI::ListboxItem *listitem = bag->getItemAtGridReference(CEGUI::MCLGridRef(j,0));
if(listitem->getUserData() == static_cast<void*>(item))
{
bag->removeRow(j);
break;
}
}
every listitems userdata in multicolumlist is set to userdata of the one just below it. all listitems are affected by it.
i fill the multicolumnlist like this
Code: Select all
unsigned int mRow = mListBox->addRow();
CEGUI::ListboxTextItem* item = new CEGUI::ListboxTextItem(c1, 0);
mListBox->setItem(item, 0, mRow);
item->setSelected(isSelected);
item->setSelectionBrushImage( "TaharezLook", "MultiListSelectionBrush");
item->setUserData(data);
in short, userdata of every listbox item below the deleted one are changed.
what i am doing wrong ?
thank you
edit: i'm using cegui 0.7.5 vc++9. problem is present in both debug and relase builds.