[fixed] GUIEditor broken in 1.7.x due to IGUIElement changes

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

[fixed] GUIEditor broken in 1.7.x due to IGUIElement changes

Post by bitplane »

Just been chatting to Armen about this, looks like Klasker's CGUIPanel no longer works because the addChild override is not being called in the constructor.

I see why this is necessary, we can't trust Parent->addChild(me) not to call me->someOtherVirtualMethod(). However, sneakily adding children this way breaks Parent's addChild method.

This has me thinking: having a parent in the IGUIElement and ISceneNode constructor when the addChild and removeChild methods are virtual is what's broken. This is the wrong way to do things, the parent/child relationship should be set by the object managing the node/element.

I've hacked in a fix to CGUIEditFactory for now, but this won't solve the underlying issue. Maybe schedule this big API change in for 2.0?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Agreed, that should be changed. See also: http://sourceforge.net/tracker/?func=de ... tid=540676
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply