Revision: 2991
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2991&view=rev
Author:   hofman
Date:     2007-09-26 08:38:51 -0700 (Wed, 26 Sep 2007)

Log Message:
-----------
Don't animate when changing a page state in a presentation.

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2007-09-25 20:25:08 UTC (rev 2990)
+++ trunk/SKPDFView.m   2007-09-26 15:38:51 UTC (rev 2991)
@@ -602,14 +602,21 @@
 #pragma mark Actions
 
 - (void)animateTransitionForNextPage:(BOOL)next {
-    NSRect rect = [self convertRect:[[self currentPage] boundsForBox:[self 
displayBox]] fromPage:[self currentPage]];
-    [[self transitionController] prepareAnimationForRect:rect];
+    unsigned int index = [[self currentPage] pageIndex];
+    BOOL shouldAnimate = [[[self currentPage] label] isEqualToString:[[[self 
document] pageAtIndex:next ? ++index : --index] label]];
+    NSRect rect;
+    if (shouldAnimate) {
+        rect = [self convertRect:[[self currentPage] boundsForBox:[self 
displayBox]] fromPage:[self currentPage]];
+        [[self transitionController] prepareAnimationForRect:rect];
+    }
     if (next)
         [super goToNextPage:self];
     else
         [super goToPreviousPage:self];
-    rect = [self convertRect:[[self currentPage] boundsForBox:[self 
displayBox]] fromPage:[self currentPage]];
-    [[self transitionController] animateForRect:rect forward:next];
+    if (shouldAnimate) {
+        rect = [self convertRect:[[self currentPage] boundsForBox:[self 
displayBox]] fromPage:[self currentPage]];
+        [[self transitionController] animateForRect:rect forward:next];
+    }
 }
 
 - (void)goToNextPage:(id)sender {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to