[Kst] [Bug 124453] Multiple levels of plot groups are destroyed shortly after creation

George Staikos staikos at kde.org
Thu Apr 6 06:18:44 CEST 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=124453         
staikos kde org changed:

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



------- Additional Comments From staikos kde org  2006-04-06 06:18 -------
SVN commit 526966 by staikos:

don't break plot groups apart.  There are still many problems lurking though.
BUG: 124453


 M  +6 -4      ksttoplevelview.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #526965:526966
 @ -330,11 +330,13  @
   _pressTarget = findDeepestChild(pos, false);
   if (_pressTarget) {
     KstViewObjectPtr p = _pressTarget;
-    while (p->_parent && p->_parent->_container) {
+    while (p->_parent && (p->_parent->_container || kst_cast<KstPlotGroup>((KstViewObjectPtr)p->_parent)) && !kst_cast<KstTopLevelView>((KstViewObjectPtr)p->_parent)) {
       p = p->_parent;
     }
-    if (p->_parent && !p->_parent->_container) {
+    if (p->_parent && !p->_parent->_container && !kst_cast<KstTopLevelView>((KstViewObjectPtr)p->_parent)) {
       _pressTarget = p->_parent;
+    } else if (p && !p->_container) {
+      _pressTarget = p;
     }
   }
 
 @ -957,10 +959,10  @
       obj = obj.unite((*i)->geometry());
     } 
   }
-  const QPoint objOffset(_pressTarget->geometry().topLeft() - obj.topLeft());
+  const QPoint objOffset(old.topLeft() - obj.topLeft());
 
   // do the move
-  obj.moveTopLeft(pos - _moveOffset - _moveOffsetSticky - _pressTarget->geometry().topLeft() + obj.topLeft());
+  obj.moveTopLeft(pos - _moveOffset - _moveOffsetSticky - old.topLeft() + obj.topLeft());
   if (!_geom.contains(obj, true)) {
     slideInto(_geom, obj);
   }


More information about the Kst mailing list