Revision: 15938
          http://sourceforge.net/p/skim-app/code/15938
Author:   hofman
Date:     2025-12-29 17:31:47 +0000 (Mon, 29 Dec 2025)
Log Message:
-----------
use scrollPoint rather than scrollToPoint to scoll the clipView as that 
apparently already calls reflectScrolledClipView

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

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2025-12-29 16:55:35 UTC (rev 15937)
+++ trunk/PDFView_SKExtensions.m        2025-12-29 17:31:47 UTC (rev 15938)
@@ -220,8 +220,7 @@
             dest.point = [self convertPoint:[self convertPoint:dest.point 
fromPage:page] toView:clipView];
             if ([clipView isFlipped] == NO)
                 dest.point.y -= NSHeight([clipView visibleRect]) - [clipView 
contentInsets].top;
-            [clipView scrollToPoint:dest.point];
-            [scrollView reflectScrolledClipView:clipView];
+            [clipView scrollPoint:dest.point];
         }
     }
 }

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2025-12-29 16:55:35 UTC (rev 15937)
+++ trunk/SKBasePDFView.m       2025-12-29 17:31:47 UTC (rev 15938)
@@ -238,8 +238,7 @@
     NSRect pageBounds = [pdfView convertRect:[pdfView convertRect:[pdfView 
boundsIncludingMarginsForPage:page] fromPage:page] toView:clipView];
     bounds.origin.x = fmin(fmax(fmin(NSMidX(pageBounds) - 0.5 * 
NSWidth(bounds), NSMinX(pageBounds)), NSMinX(docRect)), NSMaxX(docRect) - 
NSWidth(bounds));
     [pdfView goToPage:page];
-    [clipView scrollToPoint:bounds.origin];
-    [scrollView reflectScrolledClipView:clipView];
+    [clipView scrollPoint:bounds.origin];
 }
 
 static void verticallyScrollToPage(PDFView *pdfView, PDFPage *page) {
@@ -261,8 +260,7 @@
         bounds.origin.y = fmin(fmax(fmin(NSMaxY(pageRect) - 0.5 * 
(NSHeight(bounds) + inset), NSMinY(pageRect) - margin - inset), NSMinY(docRect) 
- inset), NSMaxY(docRect) - NSHeight(bounds));
     else
         bounds.origin.y = fmin(fmax(fmax(NSMinY(pageRect) - 0.5 * 
(NSHeight(bounds) - inset), NSMaxY(pageRect) + margin - NSHeight(bounds) + 
inset), NSMinY(docRect)), NSMaxY(docRect) - NSHeight(bounds) + inset);
-    [clipView scrollToPoint:bounds.origin];
-    [scrollView reflectScrolledClipView:clipView];
+    [clipView scrollPoint:bounds.origin];
 }
 
 static void verticallyScrollToTop(PDFView *pdfView) {
@@ -277,8 +275,7 @@
         bounds.origin.y = NSMinY(docRect) - inset;
     else
         bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds) + inset;
-    [clipView scrollToPoint:bounds.origin];
-    [scrollView reflectScrolledClipView:clipView];
+    [clipView scrollPoint:bounds.origin];
 }
 
 static void verticallyScrollToBottom(PDFView *pdfView) {
@@ -293,8 +290,7 @@
         bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds);
     else
         bounds.origin.y = NSMinY(docRect);
-    [clipView scrollToPoint:bounds.origin];
-    [scrollView reflectScrolledClipView:clipView];
+    [clipView scrollPoint:bounds.origin];
 }
 
 - (void)goToPreviousPage:(id)sender {
@@ -377,8 +373,7 @@
             dest.point.y -= [clipView contentInsets].top;
         else
             dest.point.y -= NSHeight([clipView bounds]) - [clipView 
contentInsets].top;
-        [clipView scrollToPoint:dest.point];
-        [scrollView reflectScrolledClipView:clipView];
+        [clipView scrollPoint:dest.point];
     } else if (hasVerticalLayout(self)) {
         verticallyScrollToPage(self, page);
     }
@@ -444,8 +439,7 @@
             bounds.origin.y = fmin(NSMaxY([[scrollView documentView] frame]) - 
height - inset, NSMinY(bounds) + offset);
         else
             return;
-        [clipView scrollToPoint:bounds.origin];
-        [scrollView reflectScrolledClipView:clipView];
+        [clipView scrollPoint:bounds.origin];
     } else if (pageIndex != NSNotFound) {
         // check whether we jumped pages
         NSUInteger currentPageIndex = [[self currentPage] pageIndex];
@@ -501,8 +495,7 @@
             bounds.origin.y = fmax(NSMinY([[scrollView documentView] frame]) - 
inset, NSMinY(bounds) - offset);
         else
             return;
-        [clipView scrollToPoint:bounds.origin];
-        [scrollView reflectScrolledClipView:clipView];
+        [clipView scrollPoint:bounds.origin];
     } else if (pageIndex != NSNotFound) {
         // check whether we jumped pages
         NSUInteger currentPageIndex = [[self currentPage] pageIndex];

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-12-29 16:55:35 UTC (rev 15937)
+++ trunk/SKPDFView.m   2025-12-29 17:31:47 UTC (rev 15938)
@@ -1048,8 +1048,7 @@
             bounds.origin.y = NSMinY(docRect);
     }
     if (NSEqualPoints(bounds.origin, currentOrigin) == NO) {
-        [clipView scrollToPoint:bounds.origin];
-        [scrollView reflectScrolledClipView:clipView];
+        [clipView scrollPoint:bounds.origin];
     }
 }
 
@@ -1550,8 +1549,7 @@
             else
                 bounds.origin.y = fmin(fmax(fmax(NSMaxY(pageRect) - 
NSHeight(bounds) + inset, NSMidY(pageRect) - 0.5 * (NSHeight(bounds) - inset)), 
NSMinY(docRect)), NSMaxY(docRect) - NSHeight(bounds) + inset);
         }
-        [clipView scrollToPoint:bounds.origin];
-        [scrollView reflectScrolledClipView:clipView];
+        [clipView scrollPoint:bounds.origin];
     }
 }
 

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