Skip to content

Commit

Permalink
BoundingBox minor
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
rodlie committed Aug 1, 2024
1 parent 75af034 commit 441fda4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/Boxes/boundingbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Boxes/boundingbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/core/canvasselectedboxesactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 441fda4

Please sign in to comment.