Revision: 2948
http://skim-app.svn.sourceforge.net/skim-app/?rev=2948&view=rev
Author: hofman
Date: 2007-09-20 06:31:42 -0700 (Thu, 20 Sep 2007)
Log Message:
-----------
Scroll secondary PDFView after a delay.
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2007-09-20 12:20:12 UTC (rev 2947)
+++ trunk/SKMainWindowController.m 2007-09-20 13:31:42 UTC (rev 2948)
@@ -1891,6 +1891,14 @@
[self setRightSidePaneState:[sender tag]];
}
+- (void)scrollSecondaryPdfView {
+ NSPoint point = [pdfView bounds].origin;
+ PDFPage *page = [pdfView pageForPoint:point nearest:YES];
+ point = [secondaryPdfView convertPoint:[secondaryPdfView
convertPoint:[pdfView convertPoint:point toPage:page] fromPage:page]
toView:[secondaryPdfView documentView]];
+ [secondaryPdfView goToPage:page];
+ [[secondaryPdfView documentView] scrollPoint:point];
+}
+
- (IBAction)toggleSplitPDF:(id)sender {
if ([secondaryPdfView window]) {
@@ -1898,7 +1906,6 @@
} else {
- NSPoint point = [pdfView convertPoint:[pdfView bounds].origin
toPage:[pdfView currentPage]];
NSRect ignored, frame1, frame2;
frame1 = [pdfSplitView bounds];
@@ -1915,8 +1922,7 @@
[secondaryPdfView setAutoScales:YES];
[secondaryPdfView layoutDocumentView];
[secondaryPdfView goToPage:[pdfView currentPage]];
- point = [secondaryPdfView convertPoint:[secondaryPdfView
convertPoint:point fromPage:[secondaryPdfView currentPage]]
toView:[secondaryPdfView documentView]];
- [[secondaryPdfView documentView] scrollPoint:point];
+ [self performSelector:@selector(scrollSecondaryPdfView) withObject:nil
afterDelay:0.0];
}
[pdfSplitView adjustSubviews];
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