From 441fda4c52a209ccbde0d437772095c67226409f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Thu, 1 Aug 2024 11:00:01 +0200 Subject: [PATCH] BoundingBox minor Rename 'scaleBy' to 'setScale' to reflect what the function actually does (it sets the scale, not increment it or something else that other By functions does). --- src/core/Boxes/boundingbox.cpp | 2 +- src/core/Boxes/boundingbox.h | 2 +- src/core/canvasselectedboxesactions.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Boxes/boundingbox.cpp b/src/core/Boxes/boundingbox.cpp index 63b8de3c2..bb7c9b037 100644 --- a/src/core/Boxes/boundingbox.cpp +++ b/src/core/Boxes/boundingbox.cpp @@ -732,7 +732,7 @@ void BoundingBox::scale(const qreal scaleXBy, const qreal scaleYBy) { mTransformAnimator->scale(scaleXBy, scaleYBy); } -void BoundingBox::scaleBy(const qreal scale) +void BoundingBox::setScale(const qreal scale) { mTransformAnimator->setScale(scale, scale); } diff --git a/src/core/Boxes/boundingbox.h b/src/core/Boxes/boundingbox.h index baf172b01..80449b601 100644 --- a/src/core/Boxes/boundingbox.h +++ b/src/core/Boxes/boundingbox.h @@ -284,7 +284,7 @@ class CORE_EXPORT BoundingBox : public eBoxOrSound { void rotateBy(const qreal rot); void scale(const qreal scaleBy); void scale(const qreal scaleXBy, const qreal scaleYBy); - void scaleBy(const qreal scale); + void setScale(const qreal scale); void saveTransformPivotAbsPos(const QPointF &absPivot); void startPosTransform(); diff --git a/src/core/canvasselectedboxesactions.cpp b/src/core/canvasselectedboxesactions.cpp index 5a237649a..22e957f83 100644 --- a/src/core/canvasselectedboxesactions.cpp +++ b/src/core/canvasselectedboxesactions.cpp @@ -318,7 +318,7 @@ void Canvas::scaleSelectedBoxesStartAndFinish(const qreal scaleBy) if (mDocument.fLocalPivot) { for(const auto &box : mSelectedBoxes) { box->startScaleTransform(); - box->scaleBy(scaleBy); + box->setScale(scaleBy); box->finishTransform(); } } else {