[Kst] [Bug 120751] Can't delete view objects
Andrew Walker
arwalker at sumusltd.com
Wed Jan 25 02:25:07 CET 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=120751
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2006-01-25 02:25 -------
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;
}
More information about the Kst
mailing list