[Kst] [Bug 92610] Deleting a plot group does not decrement usage count of curves.

George Staikos staikos at kde.org
Tue Nov 2 23:32:45 CET 2004


------- 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=92610        
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2004-11-02 23:32 -------
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