##// END OF EJS Templates
Fix pie slice label visibility...
Titta Heikkala -
r2659:fa6f046bbc74
parent child
Show More
@@ -209,7 +209,14 void PieSliceItem::updateGeometry()
209 // Hide label if it's outside the bounding rect of parent item
209 // Hide label if it's outside the bounding rect of parent item
210 QRectF labelRect(m_labelItem->boundingRect());
210 QRectF labelRect(m_labelItem->boundingRect());
211 labelRect.moveTopLeft(m_labelItem->pos());
211 labelRect.moveTopLeft(m_labelItem->pos());
212 if (parentItem()->boundingRect().contains(labelRect))
212 if ((parentItem()->boundingRect().left()
213 < (labelRect.left() + m_labelItem->document()->documentMargin() + 1.0))
214 && (parentItem()->boundingRect().right()
215 > (labelRect.right() - m_labelItem->document()->documentMargin() - 1.0))
216 && (parentItem()->boundingRect().top()
217 < (labelRect.top() + m_labelItem->document()->documentMargin() + 1.0))
218 && (parentItem()->boundingRect().bottom()
219 > (labelRect.bottom() - m_labelItem->document()->documentMargin() - 1.0)))
213 m_labelItem->show();
220 m_labelItem->show();
214 else
221 else
215 m_labelItem->hide();
222 m_labelItem->hide();
General Comments 0
You need to be logged in to leave comments. Login now