Page 1 of 1

[Resolved] ItemListbox redraw problem

Posted: Sun Sep 16, 2012 04:00
by pav
Hello, I'm having some issues with the ItemListbox. I have one inside a tab page but, when I add an item to it, it won't show it until I
a) add another item or
b) click on the tab-page's button

I've modified the TabControlDemo sample to use an ItemListbox and it has the same problem. (Pastebin patch)

Am I doing something wrong or is it a CEGUI bug? (I'll add it to Mantis if it is)

Finally, if it is a bug, is there a simple way to work around it until it's properly fixed? I tried the invalidate() method (recursive) but it didn't do anything.

Essential log info:

Code: Select all

---- Version: 9999.0.0 (Build: Sep 16 2012 GNU/Linux g++ 4.7.1 20120721 (prerelease) 32 bit) ----
---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
---- Scripting module is: None ----

Re: ItemListbox redraw problem

Posted: Mon Sep 24, 2012 03:40
by heeroz
Same to me.

I found this bug because 0.7.7 changes:
- Modified: Refactor Window::onParentSized to not abuse Window::setArea_impl.
- Modified: refactor some Window implementation: mostly breaking up setArea_impl, and then reducing some code repetition elsewhere.

Re: ItemListbox redraw problem

Posted: Fri Mar 11, 2016 18:39
by iceiceice
I also have this problem, would like to try to solve it or find a work around...

I find that it affects many but not all ItemListbox's in my project. Mainly those using a custom item entry type.

The first item is always invisible, but it will appear if the ItemListbox is perturbed in a way that causes the content pane to be laid out again -- if the scrollbar is touched, or if the frame containing the item listbox is resized.

I tried using

Code: Select all

invalidate()
,

Code: Select all

invalidate(true)
, and also

Code: Select all

getWindowRenderer()->performChildWindowLayout()
on the ItemListbox window, and none of them are sufficient to convince CEGUI to draw the missing item.

Edit:

I have found that calling

Code: Select all

notifyScreenAreaChanged()


on the ItemListbox, after populating it, is enough to persuade CEGUI to draw the missing items, and is a suitable work around for the bug.

Re: ItemListbox redraw problem

Posted: Sun Apr 23, 2017 10:48
by Ident
Fixed in v0-8 as of changeset cfab39dac3b7

This fix will be in the next 0.8 Release which will be 0.8.8