Revision: 12839 http://sourceforge.net/p/skim-app/code/12839 Author: hofman Date: 2022-04-10 22:41:47 +0000 (Sun, 10 Apr 2022) Log Message: ----------- calculate rotation only once
Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2022-04-10 16:42:43 UTC (rev 12838) +++ trunk/SKPDFView.m 2022-04-10 22:41:47 UTC (rev 12839) @@ -2207,11 +2207,12 @@ } gestureRotation -= [theEvent rotation]; if (fabs(gestureRotation) > 45.0 && gesturePageIndex != NSNotFound) { - [self rotatePageAtIndex:gesturePageIndex by:90.0 * round(gestureRotation / 90.0)]; - gestureRotation -= 90.0 * round(gestureRotation / 90.0); + CGFloat rotation = 90.0 * round(gestureRotation / 90.0); + [self rotatePageAtIndex:gesturePageIndex by:rotation]; + gestureRotation -= rotation; } if (([theEvent phase] == NSEventPhaseEnded || [theEvent phase] == NSEventPhaseCancelled)) { - gestureRotation = 0.0; + gestureRotation = 0.0; gesturePageIndex = NSNotFound; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit