Revision: 12937
          http://sourceforge.net/p/skim-app/code/12937
Author:   hofman
Date:     2022-06-22 16:19:30 +0000 (Wed, 22 Jun 2022)
Log Message:
-----------
always go to next line when no lines on the current page

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2022-06-22 09:37:35 UTC (rev 12936)
+++ trunk/SKPDFView.m   2022-06-22 16:19:30 UTC (rev 12937)
@@ -2948,8 +2948,7 @@
                 NSRect oldRect = NSZeroRect;
                 if ([self hasReadingBar] == NO) {
                     SKReadingBar *aReadingBar = [[SKReadingBar alloc] 
initWithPage:page];
-                    if (NO == [aReadingBar goToLineForPoint:point])
-                        [aReadingBar goToNextLine];
+                    [aReadingBar goToLineForPoint:point];
                     [self setReadingBar:aReadingBar];
                     [aReadingBar release];
                     if (invert)
@@ -2960,8 +2959,7 @@
                     oldPage = [readingBar page];
                     oldRect = [readingBar currentBoundsForBox:[self 
displayBox]];
                     [readingBar setPage:page];
-                    if (NO == [readingBar goToLineForPoint:point])
-                        [readingBar goToNextLine];
+                    [readingBar goToLineForPoint:point];
                     [self setNeedsDisplayInRect:oldRect ofPage:oldPage];
                     [self setNeedsDisplayInRect:[readingBar 
currentBoundsForBox:[self displayBox]] ofPage:[readingBar page]];
                 }

Modified: trunk/SKReadingBar.m
===================================================================
--- trunk/SKReadingBar.m        2022-06-22 09:37:35 UTC (rev 12936)
+++ trunk/SKReadingBar.m        2022-06-22 16:19:30 UTC (rev 12937)
@@ -242,8 +242,11 @@
 }
 
 - (BOOL)goToLineForPoint:(NSPoint)point {
-    if ([lineRects count] == 0)
+    if ([lineRects count] == 0) {
+        if (currentLine == -1)
+            return [self goToNextLine];
         return NO;
+    }
     NSInteger i = [self maxLine];
     NSInteger lineAngle = [page lineDirectionAngle];
     while (--i >= 0)

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