Revision: 15636
          http://sourceforge.net/p/skim-app/code/15636
Author:   hofman
Date:     2025-07-11 09:16:30 +0000 (Fri, 11 Jul 2025)
Log Message:
-----------
update tooltip rects and text notet editor layout from layoutDocumentView, will 
catch a lot of display setting changes, but not e.g. pinch zoom

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-07-10 16:35:33 UTC (rev 15635)
+++ trunk/SKPDFView.m   2025-07-11 09:16:30 UTC (rev 15636)
@@ -408,6 +408,14 @@
     }
 }
 
+#pragma mark Layout
+
+- (void)layoutDocumentView {
+    [super layoutDocumentView];
+    [self resetPDFToolTipRects];
+    [editor layoutWithEvent:nil];
+}
+
 #pragma mark Drawing
 
 - (BOOL)drawsActiveSelections {
@@ -698,8 +706,6 @@
         [super setDisplayMode:mode];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
     }
 }
 
@@ -737,8 +743,6 @@
         [self _setDisplaysHorizontally:horizontal];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
     }
 }
 
@@ -760,8 +764,6 @@
         [self _setDisplaysHorizontally:flag];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
     }
 }
 
@@ -780,8 +782,6 @@
         [self layoutDocumentView];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDisplaysRTLChangedNotification object:self];
     }
 }
@@ -800,8 +800,6 @@
         [super setDisplayBox:box];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
     }
 }
 
@@ -819,8 +817,6 @@
         [super setDisplaysAsBook:asBook];
         if (page && [page isEqual:[self currentPage]] == NO)
             [self goToCurrentPage:page];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
                [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDisplaysAsBookChangedNotification object:self];
     }
 }
@@ -836,8 +832,6 @@
 - (void)setDisplaysPageBreaks:(BOOL)pageBreaks {
     if (pageBreaks != [self displaysPageBreaks]) {
         [super setDisplaysPageBreaks:pageBreaks];
-        [self resetPDFToolTipRects];
-        [editor layoutWithEvent:nil];
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDisplaysPageBreaksChangedNotification 
object:self];
     }
 }
@@ -3183,8 +3177,6 @@
 
 - (void)handlePageChangedNotification:(NSNotification *)notification {
     if ([self displayMode] == kPDFDisplaySinglePage || [self displayMode] == 
kPDFDisplayTwoUp) {
-        [editor layoutWithEvent:nil];
-        [self resetPDFToolTipRects];
         if (toolMode == SKToolModeMagnify)
             [loupeController updateContents];
     }

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to