Adding items to ItemListbox doesn't update client rect

Create issue
Issue #346 resolved
Former user created an issue

Automatic migration. Original reporter: "Timo"

Tested in branches/v0-7 r2484

Some code to demonstrate the issue:

ItemListbox *ilb = (ItemListbox*)WindowManager::getSingleton().createWindow("TaharezLook/ItemListbox"); System::getSingleton().getGUISheet()->addChildWindow(ilb); ilb->setArea(UDim(0,100),UDim(0,100),UDim(0,100),UDim(0,100)); ilb->notifyScreenAreaChanged(); this is to reset the clipping rect to ItemRenderArea for(int i=0;i<10;i++){ ItemEntry *ie = (ItemEntry*)WindowManager::getSingleton().createWindow("TaharezLook/ListboxItem"); ie->setText("blahblahblahblah"); ilb->addItem(ie); }

TaharezLook isn't very good for showing it, but you can still see the issue. Even though both scrollbars are visible, the list items are not clipped to ItemRenderAreaHVScroll, but to ItemRenderArea. If you make a one more call


then the clipping rect gets updated correctly to ItemRenderAreaHVScroll.

Reproducibility: always

Comments (1)

  1. Log in to comment