Skip to content

Commit

Permalink
Simplify the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStevns committed Jan 2, 2025
1 parent e0133aa commit aee3c38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core_lib/src/managers/viewmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ QTransform ViewManager::getViewInverse() const

qreal ViewManager::getScaleInversed() const
{
return QTransform::fromScale(mScaling, mScaling).inverted().m11();
return 1. / mScaling;
}

void ViewManager::updateViewTransforms()
Expand Down
5 changes: 1 addition & 4 deletions core_lib/src/managers/viewmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ class ViewManager : public BaseManager
QTransform getView() const;
QTransform getViewInverse() const;

/**
* Creates a scaling matrix based on the current view scale and returns the inverted value
* @return The inverted scale value
*/
/** @return The inverted scale value */
qreal getScaleInversed() const;

void resetView();
Expand Down

0 comments on commit aee3c38

Please sign in to comment.