@@ -209,7 +209,14 void PieSliceItem::updateGeometry() | |||
|
209 | 209 | // Hide label if it's outside the bounding rect of parent item |
|
210 | 210 | QRectF labelRect(m_labelItem->boundingRect()); |
|
211 | 211 | labelRect.moveTopLeft(m_labelItem->pos()); |
|
212 |
if (parentItem()->boundingRect(). |
|
|
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 | 220 | m_labelItem->show(); |
|
214 | 221 | else |
|
215 | 222 | m_labelItem->hide(); |
General Comments 0
You need to be logged in to leave comments.
Login now