[Kst] branches/work/kst/portto4/kst/src/libkstapp

Barth Netterfield netterfield at astro.utoronto.ca
Thu Aug 12 23:12:11 CEST 2010


SVN commit 1162854 by netterfield:

Show the legend box title if it is set.

BUG:



 M  +2 -2      legenditem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/legenditem.cpp #1162853:1162854
@@ -125,6 +125,7 @@
       int paddingValue = fm.height() / 4;
 
       setViewRect(viewRect().x(), viewRect().y(), qMax(rc.x, legendSize.width()), rc.y + legendSize.height() + paddingValue * 3);
+      painter->drawRect(rect());
 
       painter->drawPixmap(QPoint(x + startPoint, y + paddingValue), pixmap, QRect(0, 0, rc.x, fm.height()));
       painter->restore();
@@ -135,10 +136,9 @@
   } else {
     // No Title
     setViewRect(viewRect().x(), viewRect().y(), legendSize.width(), legendSize.height());
+    painter->drawRect(rect());
   }
 
-  QRectF box = rect();
-  painter->drawRect(rect());
 
   foreach(DrawnLegendItem item, legendPixmaps) {
     painter->drawPixmap(QPoint(x, y), item.pixmap, QRect(0, 0, item.size.width(), item.size.height()));


More information about the Kst mailing list