Revision: 16650
          http://sourceforge.net/p/skim-app/code/16650
Author:   hofman
Date:     2026-10-11 17:15:06 +0000 (Sun, 11 Oct 2026)
Log Message:
-----------
combine cases

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

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2026-10-11 17:09:03 UTC (rev 16649)
+++ trunk/SKBasePDFView.m       2026-10-11 17:15:06 UTC (rev 16650)
@@ -527,24 +527,22 @@
             return;
         [clipView scrollToPoint:bounds.origin];
         [scrollView reflectScrolledClipView:clipView];
-    } else if (pageIndex != NSNotFound) {
-        // check whether we jumped pages
-        NSUInteger currentPageIndex = [[self currentPage] pageIndex];
-        if (currentPageIndex != pageIndex) {
-            [self verticallyScrollToTop:currentPageIndex > pageIndex];
-        } else if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
+    } else {
+        if (pageIndex != NSNotFound) {
+            // check whether we jumped pages
+            NSUInteger currentPageIndex = [[self currentPage] pageIndex];
+            if (currentPageIndex != pageIndex) {
+                [self verticallyScrollToTop:currentPageIndex > pageIndex];
+                return;
+            }
+        }
+        if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
             if (keyDirection == 1)
-                [super goToNextPage:sender];
+                [self goToNextPage:nil];
             else
-                [super goToPreviousPage:sender];
+                [self goToPreviousPage:nil];
             [self verticallyScrollToTop:keyDirection == 1];
         }
-    } else if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
-        if (keyDirection == 1)
-            [self goToNextPage:sender];
-        else
-            [self goToPreviousPage:sender];
-        [self verticallyScrollToTop:keyDirection == 1];
     }
 }
 
@@ -595,24 +593,22 @@
             return;
         [clipView scrollToPoint:bounds.origin];
         [scrollView reflectScrolledClipView:clipView];
-    } else if (pageIndex != NSNotFound) {
-        // check whether we jumped pages
-        NSUInteger currentPageIndex = [[self currentPage] pageIndex];
-        if (currentPageIndex != pageIndex) {
-            [self verticallyScrollToTop:currentPageIndex > pageIndex];
-        } else if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
+    } else {
+        if (pageIndex != NSNotFound) {
+            // check whether we jumped pages
+            NSUInteger currentPageIndex = [[self currentPage] pageIndex];
+            if (currentPageIndex != pageIndex) {
+                [self verticallyScrollToTop:currentPageIndex > pageIndex];
+                return;
+            }
+        }
+        if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
             if (keyDirection == -1)
-                [super goToPreviousPage:sender];
+                [self goToPreviousPage:nil];
             else
-                [super goToNextPage:sender];
+                [self goToNextPage:nil];
             [self verticallyScrollToTop:keyDirection == 1];
         }
-    } else if (clipView && NSEqualPoints([clipView bounds].origin, 
bounds.origin)) {
-        if (keyDirection == -1)
-            [self goToPreviousPage:sender];
-        else
-            [self goToNextPage:sender];
-        [self verticallyScrollToTop:keyDirection == 1];
     }
 }
 

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to