Page 1 of 1

TabControl: bug in removeTab

Posted: Tue May 13, 2008 21:06
by fedyakin
I'm not sure where the proper place is to report this:

When a window is added to a tab control (addTab), the window subscribes to EventTextChanged, with a member function of the tab control as the handler. When it is removed from the tab control (removeTab), this event handler is not removed from the window.

This prevents renaming the window once it has been removed from a tab. It could also cause a crash if the tab has been deleted.

The simplest solution I see is if the tab control keeps a mapping of window pointers to Event::Connections and uses this to disconnect the handler when removing a tab.

Posted: Wed May 14, 2008 06:55
by scriptkid
Sounds like a good catch to me, thanks for reporting :)

It's in Mantis: http://www.cegui.org.uk/mantis/view.php?id=192

Thanks

Posted: Fri Jun 06, 2008 22:31
by fedyakin
I see that this has been fixed already; thanks a lot :D

Posted: Sat Jun 07, 2008 08:17
by CrazyEddie
We aim to please :)

Thanks again for raising the issue in the first place.

CE.