[Kst] [Bug 124556] Legend not shown in maximized plots

George Staikos staikos at kde.org
Thu Mar 30 16:08:52 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=124556         
staikos kde org changed:

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



------- Additional Comments From staikos kde org  2006-03-30 16:08 -------
SVN commit 524417 by staikos:

- make maximized objects show their children
- make printing of maximized objects work
BUG: 124556


 M  +15 -5     kstviewobject.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #524416:524417
 @ -295,11 +295,23  @
 
 
 void KstViewObject::paint(KstPainter& p, const QRegion& bounds) {
+  bool maximized = false;
   if (p.type() == KstPainter::P_EXPORT || p.type() == KstPainter::P_PRINT) {
-    paintSelf(p, bounds);
+    // handle the case where we have maximized plots
     for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
-      (*i)->paint(p, bounds);
+      if ((*i)->_maximized) {
+        (*i)->paint(p, bounds);
+        maximized = true;
+        break;
+      }
     }
+
+    if (!maximized) {
+      paintSelf(p, bounds);
+      for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+        (*i)->paint(p, bounds);
+      }
+    }
     return;
   }
 
 @ -316,14 +328,12  @
 #endif
   paintUpdate();
 
-  bool maximized = false;
   bool nullBounds = bounds.isNull();
 
   // handle the case where we have maximized plots
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     if ((*i)->_maximized) {
-      (*i)->updateSelf();
-      (*i)->paintSelf(p, bounds);
+      (*i)->paint(p, bounds);
       maximized = true;
       break;
     }


More information about the Kst mailing list