Fix newly introduced warnings

Change-Id: I0b9cf3496d536e1173fbd6587e5b491305eb876c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2022-02-18 14:28:34 +01:00
parent 59982f1ca9
commit 52e26a360b
8 changed files with 12 additions and 180 deletions

View File

@@ -276,8 +276,6 @@ void ImageView::doScale(qreal factor)
void ImageView::wheelEvent(QWheelEvent *event)
{
qreal factor = qPow(Constants::DEFAULT_SCALE_FACTOR, event->angleDelta().y() / 240.0);
qreal currentScale = transform().m11();
qreal newScale = currentScale * factor;
// cap to 0.001 - 1000
qreal actualFactor = qBound(0.001, factor, 1000.0);
doScale(actualFactor);