Revision: 12710
          http://sourceforge.net/p/skim-app/code/12710
Author:   hofman
Date:     2022-01-12 15:42:34 +0000 (Wed, 12 Jan 2022)
Log Message:
-----------
reorganize variables

Modified Paths:
--------------
    trunk/SKTransitionController.m

Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m      2022-01-12 15:34:41 UTC (rev 12709)
+++ trunk/SKTransitionController.m      2022-01-12 15:42:34 UTC (rev 12710)
@@ -463,12 +463,9 @@
     }
     
     SKTransitionInfo *currentTransition = transition;
-    BOOL currentForward = (toIndex >= fromIndex);
-    
     NSUInteger idx = MIN(fromIndex, toIndex);
-    if (fromIndex != NSNotFound && toIndex != NSNotFound && idx < 
[pageTransitions count]) {
+    if (fromIndex != NSNotFound && toIndex != NSNotFound && idx < 
[pageTransitions count])
         currentTransition = [[[SKTransitionInfo alloc] 
initWithProperties:[pageTransitions objectAtIndex:idx]] autorelease];
-    }
     
     if ([currentTransition transitionStyle] == SKNoTransition) {
         
@@ -506,7 +503,7 @@
         // specify our specifications
         spec.unknown1 = 0;
         spec.type =  [currentTransition transitionStyle];
-        spec.option = currentForward ? CGSLeft : CGSRight;
+        spec.option = toIndex >= fromIndex ? CGSLeft : CGSRight;
         spec.backColour = NULL;
         spec.wid = [([currentTransition shouldRestrict] ? window : viewWindow) 
windowNumber];
         
@@ -558,7 +555,7 @@
         CIFilter *transitionFilter = [self 
transitionFilterForTransition:currentTransition
                                                                     rect:cgRect
                                                                   
bounds:cgBounds
-                                                                 
forward:currentForward
+                                                                 
forward:toIndex >= fromIndex
                                                             
initialImage:initialImage
                                                               
finalImage:finalImage];
         [self showTransitionViewForRect:bounds image:initialImage 
extent:cgBounds];

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

Reply via email to