Revision: 13416
          http://sourceforge.net/p/skim-app/code/13416
Author:   hofman
Date:     2023-04-03 08:59:07 +0000 (Mon, 03 Apr 2023)
Log Message:
-----------
use ccurrent offset when passing null offset in destination

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

Modified: trunk/PDFDestination_SKExtensions.m
===================================================================
--- trunk/PDFDestination_SKExtensions.m 2023-04-02 21:31:28 UTC (rev 13415)
+++ trunk/PDFDestination_SKExtensions.m 2023-04-03 08:59:07 UTC (rev 13416)
@@ -70,6 +70,11 @@
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.width / NSWidth(bounds);
+                if (override && pdfView && point.y >= 
kPDFDestinationUnspecifiedValue) {
+                    PDFDestination *d = [pdfView currentDestination];
+                    if ([d page] == page)
+                        point.y = [d point].y;
+                }
                 break;
             case 3: // FitV
                 bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page 
boundsForBox:kPDFDisplayBoxCropBox];
@@ -77,6 +82,11 @@
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.height / NSHeight(bounds);
+                if (override && pdfView && point.x >= 
kPDFDestinationUnspecifiedValue) {
+                    PDFDestination *d = [pdfView currentDestination];
+                    if ([d page] == page)
+                        point.x = [d point].x;
+                }
                 break;
             case 4: // FitR
             {
@@ -107,6 +117,11 @@
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.width / NSWidth(bounds);
+                if (override && pdfView && point.y >= 
kPDFDestinationUnspecifiedValue) {
+                    PDFDestination *d = [pdfView currentDestination];
+                    if ([d page] == page)
+                        point.y = [d point].y;
+                }
                 break;
             case 7: // FitBV
                 bounds = [page foregroundRect];
@@ -114,6 +129,11 @@
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.height / NSHeight(bounds);
+                if (override && pdfView && point.x >= 
kPDFDestinationUnspecifiedValue) {
+                    PDFDestination *d = [pdfView currentDestination];
+                    if ([d page] == page)
+                        point.x = [d point].x;
+                }
                 break;
             default:
                 override = NO;

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