Revision: 15246
          http://sourceforge.net/p/skim-app/code/15246
Author:   hofman
Date:     2025-05-21 09:12:57 +0000 (Wed, 21 May 2025)
Log Message:
-----------
also predraw next page when all pages change

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

Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m  2025-05-21 09:10:14 UTC (rev 15245)
+++ trunk/SKPresentationView.m  2025-05-21 09:12:57 UTC (rev 15246)
@@ -543,9 +543,11 @@
 }
 
 - (void)setNeedsDisplayForPage:(PDFPage *)aPage {
-    if (page) {
-        [self removePredrawnImageAtIndex:aPage ? [aPage pageIndex] : 
NSNotFound];
-        if (page == aPage || aPage == nil) {
+    if (page == nil)
+        return;
+    if (aPage) {
+        [self removePredrawnImageAtIndex:[aPage pageIndex]];
+        if (page == aPage) {
             [[self class] cancelPreviousPerformRequestsWithTarget:self 
selector:@selector(displayCurrentPage:) object:nil];
             [self performSelector:@selector(displayCurrentPage:) 
withObject:nil afterDelay:0.0];
         } else if ([page pageIndex] + 1 == [aPage pageIndex]) {
@@ -552,6 +554,12 @@
             [[self class] cancelPreviousPerformRequestsWithTarget:self 
selector:@selector(predrawNextPage) object:nil];
             [self performSelector:@selector(predrawNextPage) withObject:nil 
afterDelay:0.0];
         }
+    } else {
+        [self removePredrawnImageAtIndex:NSNotFound];
+        [[self class] cancelPreviousPerformRequestsWithTarget:self 
selector:@selector(displayCurrentPage:) object:nil];
+        [self performSelector:@selector(displayCurrentPage:) withObject:nil 
afterDelay:0.0];
+        [[self class] cancelPreviousPerformRequestsWithTarget:self 
selector:@selector(predrawNextPage) object:nil];
+        [self performSelector:@selector(predrawNextPage) withObject:nil 
afterDelay:0.0];
     }
 }
 

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