Request to overload removeChildWindow for tab containers

Issue #15 resolved
Former user created an issue

Automatic migration. Original reporter: "fiesch"

This is the according forum post:

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...

Reproducibility: always

Additional information: Overloading the removeChild window might really improve usability and act more like "outsiders" would expect it to (symetrically to addChildWindow)

Comments (1)

  1. Paul Turner

    I have changed removeChildWindow for TabControl so it correctly removes and cleansup the entire tab where appropriate. In doing so, the behaviour of removeTab has been made non-throwing in the case that the tab is not attached.

    So, you now have both options open to you :)

  2. Log in to comment