Revision: 15919
          http://sourceforge.net/p/skim-app/code/15919
Author:   hofman
Date:     2025-12-25 17:30:20 +0000 (Thu, 25 Dec 2025)
Log Message:
-----------
don't go to current page in display setting setters, this does not work anyway 
and is handled in the AndRewind version if needed

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-12-25 17:17:23 UTC (rev 15918)
+++ trunk/SKPDFView.m   2025-12-25 17:30:20 UTC (rev 15919)
@@ -697,10 +697,7 @@
 
 - (void)setDisplayMode:(PDFDisplayMode)mode {
     if (mode != [self displayMode] || (mode == kPDFDisplaySinglePageContinuous 
&& [self displaysHorizontally])) {
-        PDFPage *page = [self currentPage];
         [super setDisplayMode:mode];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
     }
 }
 
@@ -728,7 +725,6 @@
 
 - (void)setExtendedDisplayMode:(PDFDisplayMode)mode {
     if (mode != [self extendedDisplayMode]) {
-        PDFPage *page = [self currentPage];
         BOOL horizontal = NO;
         if (mode == kPDFDisplayHorizontalContinuous) {
             mode = kPDFDisplaySinglePageContinuous;
@@ -736,8 +732,6 @@
         }
         [super setDisplayMode:mode];
         [self _setDisplaysHorizontally:horizontal];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
     }
 }
 
@@ -755,10 +749,7 @@
 
 - (void)setDisplaysHorizontally:(BOOL)flag {
     if (flag != [self displaysHorizontally]) {
-        PDFPage *page = [self currentPage];
         [self _setDisplaysHorizontally:flag];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
     }
 }
 
@@ -771,12 +762,9 @@
 
 - (void)setDisplaysRTL:(BOOL)flag {
     if (flag != [self displaysRTL]) {
-        PDFPage *page = [self currentPage];
         [super setDisplaysRTL:flag];
         // on 10.15 this does not relayout the view...
         [self layoutDocumentView];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDisplaysRTLChangedNotification object:self];
     }
 }
@@ -791,10 +779,7 @@
 
 - (void)setDisplayBox:(PDFDisplayBox)box {
     if (box != [self displayBox]) {
-        PDFPage *page = [self currentPage];
         [super setDisplayBox:box];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
     }
 }
 
@@ -808,10 +793,7 @@
 
 - (void)setDisplaysAsBook:(BOOL)asBook {
     if (asBook != [self displaysAsBook]) {
-        PDFPage *page = [self currentPage];
         [super setDisplaysAsBook:asBook];
-        if (page && [page isEqual:[self currentPage]] == NO)
-            [self goAndScrollToPage:page];
                [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDisplaysAsBookChangedNotification object:self];
     }
 }

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