r24894 by jghali - More understandable code for latest commit

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 3 21:56:47 UTC 2022


Author: jghali
Date: Thu Feb  3 21:56:47 2022
New Revision: 24894

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24894
Log:
More understandable code for latest commit

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24894&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Thu Feb  3 21:56:47 2022
@@ -3210,8 +3210,8 @@
 	}
 	else
 	{
-		int signOfX = (angleDelta.x() > 0) ? 1 : ((angleDelta.x() < 0) ? -1 : 0);
-		int signOfY = (angleDelta.y() > 0) ? 1 : ((angleDelta.y() < 0) ? -1 : 0);
+		int signOfX = (angleDelta.x() == 0) ? 0 : ((angleDelta.x() < 0) ? -1 : 1);
+		int signOfY = (angleDelta.y() == 0) ? 0 : ((angleDelta.y() < 0) ? -1 : 1);
 		int dX = -Prefs->uiPrefs.wheelJump * signOfX;
 		int dY = -Prefs->uiPrefs.wheelJump * signOfY;
 		if (w->modifiers() == Qt::ShiftModifier)




More information about the scribus-commit mailing list