##// END OF EJS Templates
Fixed a bug with pie slice clip rect
Tero Ahola -
r1297:e9ff71cfa16b
parent child
Show More
@@ -27,6 +27,7
27 27 #include <qmath.h>
28 28 #include <QGraphicsSceneEvent>
29 29 #include <QTime>
30 #include <QDebug>
30 31
31 32 QTCOMMERCIALCHART_BEGIN_NAMESPACE
32 33
@@ -78,12 +79,14 void PieSliceItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*op
78 79 painter->restore();
79 80
80 81 if (m_data.m_isLabelVisible) {
82 painter->save();
81 83 painter->setClipRect(parentItem()->boundingRect());
82 84 painter->setPen(m_data.m_labelPen);
83 85 painter->drawPath(m_labelArmPath);
84 86 // the pen color will affect the font color as well
85 87 painter->setFont(m_data.m_labelFont);
86 88 painter->drawText(m_labelTextRect.bottomLeft(), m_data.m_labelText);
89 painter->restore();
87 90 }
88 91 }
89 92
General Comments 0
You need to be logged in to leave comments. Login now