* Erik Hofman -- Monday 16 May 2005 10:40:
No, removeChild isn't broken, the GUI code was broken.
So you have a good explanation for getNode() on a removed node not returning 0? I'd say, removeChild() *is* broken, no matter how many other bugs there are in the dialog code.
I didn't test that *after* applying this patch but I really wondered why the following code behaved different that what Andy proposed (while it should be the same):
if (pos >= 0) { ret = _children[pos]; vector<SGPropertyNode_ptr>::iterator it = _children.begin(); it += pos; _children.erase(it); fireChildRemoved(ret); }
or even:
if (pos >= 0) { ret = _children[pos]; _childern[pos] = _children.back(); _children.pop_back(); fireChildRemoved(ret); }
Erik
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d