Revision: 3222
http://skim-app.svn.sourceforge.net/skim-app/?rev=3222&view=rev
Author: hofman
Date: 2007-11-19 05:27:03 -0800 (Mon, 19 Nov 2007)
Log Message:
-----------
Scroll page to visible after zoom to height.
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-11-19 13:08:25 UTC (rev 3221)
+++ trunk/SKMainWindowController.m 2007-11-19 13:27:03 UTC (rev 3222)
@@ -1595,10 +1595,13 @@
[pdfView setScaleFactor:NSWidth(frame) / width];
} else {
// zoom to height
- float height = NSHeight([pdfView convertRect:[[pdfView currentPage]
boundsForBox:[pdfView displayBox]] fromPage:[pdfView currentPage]]) /
scaleFactor;
+ NSRect pageRect = [[pdfView currentPage] boundsForBox:[pdfView
displayBox]];
+ float height = NSHeight([pdfView convertRect:pageRect
fromPage:[pdfView currentPage]]) / scaleFactor;
if ([pdfView displaysPageBreaks])
height += 10.0;
[pdfView setScaleFactor:NSHeight(frame) / height];
+ [pdfView layoutDocumentView];
+ [pdfView scrollRect:pageRect inPageToVisible:[pdfView currentPage]];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit