Revision: 9408
          http://sourceforge.net/p/skim-app/code/9408
Author:   hofman
Date:     2017-04-24 14:18:11 +0000 (Mon, 24 Apr 2017)
Log Message:
-----------
always scroll for pdf sync when page was not displayed yet

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2017-04-24 13:34:14 UTC (rev 9407)
+++ trunk/SKPDFView.m   2017-04-24 14:18:11 UTC (rev 9408)
@@ -2226,8 +2226,9 @@
         NSRect rect = lineRect;
         NSRect visibleRect;
         NSPoint p;
+        BOOL wasPageDisplayed = NSLocationInRange(pageIndex, [self 
displayedPageIndexRange]);
         
-        if (NSLocationInRange(pageIndex, [self displayedPageIndexRange]) == NO)
+        if (wasPageDisplayed == NO)
             [self goToPage:page];
         
         if (interactionMode != SKPresentationMode) {
@@ -2247,7 +2248,7 @@
         
         visibleRect = [self convertRect:[self visibleContentRect] toPage:page];
         
-        if (NSContainsRect(visibleRect, lineRect) == NO) {
+        if (wasPageDisplayed == NO || NSContainsRect(visibleRect, lineRect) == 
NO) {
             if ([self displayMode] == kPDFDisplaySinglePageContinuous || [self 
displayMode] == kPDFDisplayTwoUpContinuous)
                 rect = NSInsetRect(lineRect, 0.0, - floor( ( 
NSHeight(visibleRect) - NSHeight(rect) ) / 2.0 ) );
             if (NSWidth(rect) > NSWidth(visibleRect)) {

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to