Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Avoid shapeChanged() calls in KoShape::setTransformation
Dmitry Kazakov64a04b065566
diff --git a/libs/flake/KoShape.cpp b/libs/flake/KoShape.cppindex fc9c3b0945..1f4680a662 100644--- a/libs/flake/KoShape.cpp+++ b/libs/flake/KoShape.cpp@@ -409,16 +409,22 @@ void KoShape::applyAbsoluteTransformation(const QTransform &matrix)void KoShape::applyTransformation(const QTransform &matrix){- s->localMatrix = matrix * s->localMatrix;- notifyChanged();- shapeChangedPriv(GenericMatrixChange);+ const QTransform newLocalMatrix = matrix * s->localMatrix;++ if (s->localMatrix != newLocalMatrix) {+ s->localMatrix = newLocalMatrix;+ notifyChanged();+ shapeChangedPriv(GenericMatrixChange);+ }}void KoShape::setTransformation(const QTransform &matrix){- s->localMatrix = matrix;- notifyChanged();- shapeChangedPriv(GenericMatrixChange);+ if (s->localMatrix != matrix) {+ s->localMatrix = matrix;+ notifyChanged();+ shapeChangedPriv(GenericMatrixChange);+ }}QTransform KoShape::transformation() const