[Kst] [Bug 115893] Alignment is broken with groups

Andrew Walker arwalker at sumusltd.com
Thu Dec 1 19:57:01 CET 2005


------- 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=115893         
arwalker sumusltd com changed:

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



------- Additional Comments From arwalker sumusltd com  2005-12-01 19:57 -------
SVN commit 484745 by arwalker:

BUG:115893 Ensure axis alignment occurs across groups by burrowing down into groups to determine the axis alignment and dirty states.

 M  +5 -6      ksttoplevelview.cpp  
 M  +8 -0      kstviewobject.cpp  


--- trunk/extragear/graphics/kst/kst/ksttoplevelview.cpp #484744:484745
 @ -112,11 +112,8  @
     //        X11 triggered event in that case, since we already iterate.
     //        Also this might break if a draw happens before this is called,
     //        which was at least the case at one time in the past.
-    for (KstViewObjectList::ConstIterator i = _children.begin(); i != _children.end(); ++i) {
-      if ((*i)->dirty()) {
-        updateAlignment(p);
-        break;
-      }
+    if (objectDirty()) {
+      updateAlignment(p);
     }
   }
 #ifdef BENCHMARK
 @ -143,7 +140,9  @
   KST::alignment.reset();  
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     (*i)->internalAlignment(p, plotRegion);
-    KST::alignment.setPosition((*i)->geometry(), plotRegion);
+    if (!plotRegion.isNull()) {
+      KST::alignment.setPosition((*i)->geometry(), plotRegion);
+    }
   }
 }
 
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #484744:484745
 @ -544,6 +544,14  @
 void KstViewObject::internalAlignment(KstPainter& p, QRect& plotRegion) {
   Q_UNUSED(p)
   static const QRect x(0,0,0,0);
+
+  for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+    (*i)->internalAlignment(p, plotRegion);
+    if (!plotRegion.isNull()) {
+      KST::alignment.setPosition((*i)->geometry(), plotRegion);
+    }
+  }
+  
   plotRegion = x;
 }


More information about the Kst mailing list