scene: Avoid discard quads when only position changes

Since the quads are in the item local coordinate space now, it is okay
not to discard cached quads if only the item position changes.
This commit is contained in:
Vlad Zahorodnii 2021-07-01 22:09:43 +03:00
parent c6ffdf4f7f
commit 8b8669eece

View file

@ -52,7 +52,6 @@ void Item::setX(int x)
scheduleRepaint(boundingRect());
m_x = x;
scheduleRepaint(boundingRect());
discardQuads();
Q_EMIT xChanged();
}
@ -69,7 +68,6 @@ void Item::setY(int y)
scheduleRepaint(boundingRect());
m_y = y;
scheduleRepaint(boundingRect());
discardQuads();
Q_EMIT yChanged();
}
@ -184,8 +182,6 @@ void Item::setPosition(const QPoint &point)
m_y = point.y();
scheduleRepaint(boundingRect());
discardQuads();
if (xDirty) {
Q_EMIT xChanged();
}