[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Tue Nov 2 23:32:36 CET 2004
CVS commit by staikos:
Delete groups properly and fix child removal
BUG: 92610
M +6 -4 kstviewobject.cpp 1.96
--- kdeextragear-2/kst/kst/kstviewobject.cpp #1.95:1.96
@@ -277,11 +277,9 @@ bool KstViewObject::removeChild(KstViewO
if (rc == 0 && recursive) {
for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
- if ((*i)->removeChild(obj, true)) {
- obj->_parent = 0L;
- return true;
- }
+ (*i)->removeChild(obj, true);
}
}
+ obj->_parent = 0L;
return rc > 0;
}
@@ -723,4 +721,8 @@ void KstViewObject::deleteObject() {
_parent->removeChild(this);
}
+ for (KstViewObjectList::Iterator it = _children.begin(); it != _children.end(); ++it) {
+ (*it)->_parent = 0L;
+ }
+ _children.clear();
QTimer::singleShot(0, KstApp::inst(), SLOT(updateDialogs()));
}
More information about the Kst
mailing list