@@ -41,14 +41,10 PieChartItem::PieChartItem(QPieSeries *series, ChartPresenter* presenter) | |||
|
41 | 41 | connect(series, SIGNAL(piePositionChanged()), this, SLOT(handlePieLayoutChanged())); |
|
42 | 42 | connect(series, SIGNAL(pieSizeChanged()), this, SLOT(handlePieLayoutChanged())); |
|
43 | 43 | |
|
44 | QTimer::singleShot(0, this, SLOT(initialize())); | |
|
44 | QTimer::singleShot(0, this, SLOT(initialize())); // TODO: get rid of this | |
|
45 | 45 | |
|
46 | 46 | // Note: the following does not affect as long as the item does not have anything to paint |
|
47 | 47 | setZValue(ChartPresenter::PieSeriesZValue); |
|
48 | ||
|
49 | // If enabled slice boundingrect() is called instead of shape(). | |
|
50 | // And this causes severe issues with mouse click & hover decection. | |
|
51 | //setFlags(QGraphicsItem::ItemClipsChildrenToShape); | |
|
52 | 48 | } |
|
53 | 49 | |
|
54 | 50 | PieChartItem::~PieChartItem() |
@@ -75,6 +75,7 void PieSliceItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*op | |||
|
75 | 75 | painter->restore(); |
|
76 | 76 | |
|
77 | 77 | if (m_data.m_isLabelVisible) { |
|
78 | painter->setClipRect(parentItem()->boundingRect()); | |
|
78 | 79 | painter->setPen(m_data.m_labelPen); |
|
79 | 80 | painter->drawPath(m_labelArmPath); |
|
80 | 81 | // the pen color will affect the font color as well |
General Comments 0
You need to be logged in to leave comments.
Login now