Revision: 13787
          http://sourceforge.net/p/skim-app/code/13787
Author:   hofman
Date:     2023-11-20 15:41:12 +0000 (Mon, 20 Nov 2023)
Log Message:
-----------
ignore point for rotated pages immediately

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2023-11-20 15:22:33 UTC (rev 13786)
+++ trunk/SKMainWindowController.m      2023-11-20 15:41:12 UTC (rev 13787)
@@ -1085,7 +1085,7 @@
     PDFDocument *oldPdfDoc = [pdfView document];
     NSUInteger pageIndex = NSNotFound, secondaryPageIndex = NSNotFound;
     NSPoint point = NSZeroPoint, secondaryPoint = NSZeroPoint;
-    BOOL rotated = NO, secondaryRotated = NO;
+    BOOL rotated = NO;
     NSArray *snapshotDicts = nil;
     NSDictionary *openState = nil;
     
@@ -1106,8 +1106,13 @@
         // this is a revert
         // need to clean up data and actions, and remember settings to restore
         pageIndex = [pdfView currentPageIndexAndPoint:&point rotated:&rotated];
-        if (secondaryPdfView)
-            secondaryPageIndex = [secondaryPdfView 
currentPageIndexAndPoint:&secondaryPoint rotated:&secondaryRotated];
+        if (rotated)
+            point = SKUnspecifiedPoint;
+        if (secondaryPdfView) {
+            secondaryPageIndex = [secondaryPdfView 
currentPageIndexAndPoint:&secondaryPoint rotated:&rotated];
+            if (rotated)
+                secondaryPoint = SKUnspecifiedPoint;
+        }
         openState = [self expansionStateForOutline:[[pdfView document] 
outlineRoot]];
         
         [oldPdfDoc cancelFindString];
@@ -1183,7 +1188,7 @@
             if ([pdfDocument isLocked] && ([self interactionMode] == 
SKNormalMode || [self interactionMode] == SKFullScreenMode)) {
                 [savedNormalSetup setObject:[NSNumber 
numberWithUnsignedInteger:pageIndex] forKey:PAGEINDEX_KEY];
             } else {
-                [pdfView goToPageAtIndex:pageIndex point:rotated ? 
SKUnspecifiedPoint : point];
+                [pdfView goToPageAtIndex:pageIndex point:point];
             }
         }
         if (secondaryPageIndex != NSNotFound) {
@@ -1191,7 +1196,7 @@
                 secondaryPageIndex = [pdfDocument pageCount] - 1;
                 secondaryPoint = SKUnspecifiedPoint;
             }
-            [secondaryPdfView goToPageAtIndex:secondaryPageIndex 
point:secondaryRotated ? SKUnspecifiedPoint : secondaryPoint];
+            [secondaryPdfView goToPageAtIndex:secondaryPageIndex 
point:secondaryPoint];
         }
         [pdfView resetHistory];
     }

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