[BUG, well kinda] Tab Pane doesn't destroy auto-gen TabBtns

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
fiesch
Just popping in
Just popping in
Posts: 8
Joined: Thu Oct 27, 2005 20:11
Location: Bavaria, Germany
Contact:

[BUG, well kinda] Tab Pane doesn't destroy auto-gen TabBtns

Postby fiesch » Wed Nov 02, 2005 06:06

Hi, stumbled across sth you might call a bug.

For a editor I'm doing in ogre and CEGUI I use a TabControl to which i dynamically add and remove tabs depending on the entity being edited.

Thing is:
When you remove a tab using "removeChildWindow", it's auto-generated __auto_btn[WINDOWNAME] doesn't get removed and that throws a duplicate item exception if you try to re-attach the window later on.

Using removeTab helps, but that (as opposed to removeChildWindow) throws an exception if the Tab isn't actually attached to the TabControl
(which is kinda bad for me since i remove all each time and selectively re-add the appropriate tabs)

..i think overloading removeChildWindow for the tabControl would save people a lot of confusion there...

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: [BUG, well kinda] Tab Pane doesn't destroy auto-gen TabB

Postby martignasse » Wed Nov 02, 2005 18:59

When you remove a tab using "removeChildWindow", it's auto-generated __auto_btn[WINDOWNAME] doesn't get removed and that throws a duplicate item exception if you try to re-attach the window later on.
Maybe the auto-generated button "isDestroyedByParent()" return false, or he isn't child of the TabPan but the TabControl... :?

Like you see, just try to help.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests