From 8b8669eece62e7ab131d48f3bcc1d925dab3a4fd Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 1 Jul 2021 22:09:43 +0300 Subject: [PATCH] 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. --- src/item.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index e121d777aa..aa765fdc6c 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -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(); }