Properly update parent item's bounding rect when moving item
The bounding rect of an item is in the item-local coordinate space. If the item is moved, its bounding rect won't change, but the parent's bounding rect, may change. BUG: 443756
This commit is contained in:
parent
ff3465a80e
commit
59a4a908f9
1 changed files with 3 additions and 1 deletions
|
@ -106,7 +106,9 @@ void Item::setPosition(const QPoint &point)
|
|||
if (m_position != point) {
|
||||
scheduleRepaint(boundingRect());
|
||||
m_position = point;
|
||||
updateBoundingRect();
|
||||
if (m_parentItem) {
|
||||
m_parentItem->updateBoundingRect();
|
||||
}
|
||||
scheduleRepaint(boundingRect());
|
||||
Q_EMIT positionChanged();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue