@@ -206,6 +206,13 void PieSliceItem::updateGeometry() | |||
|
206 | 206 | m_labelItem->setRotation(0); |
|
207 | 207 | } |
|
208 | 208 | } |
|
209 | // Hide label if it's outside the bounding rect of parent item | |
|
210 | QRectF labelRect(m_labelItem->boundingRect()); | |
|
211 | labelRect.moveTopLeft(m_labelItem->pos()); | |
|
212 | if (parentItem()->boundingRect().contains(labelRect)) | |
|
213 | m_labelItem->show(); | |
|
214 | else | |
|
215 | m_labelItem->hide(); | |
|
209 | 216 | } |
|
210 | 217 | |
|
211 | 218 | // bounding rect |
General Comments 0
You need to be logged in to leave comments.
Login now