r25059 by jghali - Fix incorrect integer division discovered by SonarLint

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 24 21:47:15 UTC 2022


Author: jghali
Date: Thu Mar 24 21:47:15 2022
New Revision: 25059

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25059
Log:
Fix incorrect integer division discovered by SonarLint

Modified:
    branches/Version15x/Scribus/scribus/scribusview.cpp

Modified: branches/Version15x/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25059&path=/branches/Version15x/Scribus/scribus/scribusview.cpp
==============================================================================
--- branches/Version15x/Scribus/scribus/scribusview.cpp	(original)
+++ branches/Version15x/Scribus/scribus/scribusview.cpp	Thu Mar 24 21:47:15 2022
@@ -3531,7 +3531,7 @@
 {
 	QPoint globalPoint = m_canvas->canvasToGlobal(QPointF(canvasX, canvasY));
 	double oldScale = m_canvas->scale();
-	double newScale = (scale > (Prefs->opToolPrefs.magMax / 100) * Prefs->displayPrefs.displayScale) ? ((Prefs->opToolPrefs.magMax / 100) * Prefs->displayPrefs.displayScale) : scale;
+	double newScale = (scale > (Prefs->opToolPrefs.magMax / 100.0) * Prefs->displayPrefs.displayScale) ? ((Prefs->opToolPrefs.magMax / 100.0) * Prefs->displayPrefs.displayScale) : scale;
 	undoManager->setUndoEnabled(false);
 	updatesOn(false);
 	setScale(newScale);




More information about the scribus-commit mailing list