Version: 1.2.0_devel (using KDE 3.4.3, Gentoo) Compiler: gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8) OS: Linux (i686) release 2.6.14-gentoo-r5 Create a plot. Create a view object in the plot, as a child of the plot (eg, a box completely included in a 2dplot.). Go into layout mode. RMB->delete on the view object. It doesn't disappear. It should. NOTE: If the view object is a child of the tlv (eg, have it straddle two plots), rather than the child of the plot, then it is deleted. Critical for 1.2
I did get kst to crash while playing around with this. It may or may not be related.
SVN commit 502164 by arwalker: BUG:120751 The line rc == rc && (*i)->removeChild(obj, true) in KstViewObject::removeChild(...) was not having the desired effect as if rc is false the rest of the line is ignored. The solution is to simply reverse the order of the operation. M +3 -1 kstviewobject.cpp --- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #502163:502164 @@ -461,13 +461,15 @@ bool KstViewObject::removeChild(KstViewObjectPtr obj, bool recursive) { bool rc = _children.remove(obj) > 0; + if (recursive) { for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) { - rc = rc && (*i)->removeChild(obj, true); + rc = (*i)->removeChild(obj, true) && rc; } } obj->_parent = 0L; + return rc; }