diff options
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 95b2589..df140e3 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2791,9 +2791,10 @@ void QGraphicsItem::setMatrix(const QMatrix &matrix, bool combine) return; // Notify the item that the transformation matrix is changing. - QVariant variant; - qVariantSetValue<QMatrix>(variant, newTransform.toAffine()); - newTransform = QTransform(qVariantValue<QMatrix>(itemChange(ItemMatrixChange, variant))); + // Notify the item that the matrix is changing. + QVariant newTransformVariant(itemChange(ItemMatrixChange, + qVariantFromValue<QMatrix>(newTransform.toAffine()))); + newTransform = QTransform(qVariantValue<QMatrix>(newTransformVariant)); if (oldTransform == newTransform) return; |