Revision: 15872
          http://sourceforge.net/p/skim-app/code/15872
Author:   hofman
Date:     2025-12-15 17:27:10 +0000 (Mon, 15 Dec 2025)
Log Message:
-----------
create secondary pdfview at required size, don't temporarily expand split view

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

Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m      2025-12-15 16:50:25 UTC (rev 
15871)
+++ trunk/SKMainWindowController_Actions.m      2025-12-15 17:27:10 UTC (rev 
15872)
@@ -1108,7 +1108,7 @@
         BOOL createNew = secondaryPdfView == nil;
         
         if (createNew) {
-            secondaryPdfView = [[SKSecondaryPDFView alloc] 
initWithFrame:NSMakeRect(0.0, 0.0, 200.0, 20.0)];
+            secondaryPdfView = [[SKSecondaryPDFView alloc] 
initWithFrame:NSMakeRect(0.0, 0.0, NSWidth(frame), lastSplitPDFHeight)];
             [secondaryPdfView setAutoresizingMask:NSViewWidthSizable | 
NSViewHeightSizable];
             [secondaryPdfView setHidden:YES];
             [pdfSplitView addSubview:secondaryPdfView];
@@ -1123,12 +1123,11 @@
             point.y += fixedAtBottom ? -lastSplitPDFHeight : 
lastSplitPDFHeight + [pdfSplitView dividerThickness];
             page = [pdfView pageForPoint:point nearest:YES];
             point = [pdfView convertPoint:point toPage:page];
-            [pdfSplitView setPosition:position ofDividerAtIndex:0];
             [secondaryPdfView goToPage:page];
-            point = [secondaryPdfView convertPoint:[secondaryPdfView 
convertPoint:point fromPage:page] toView:[secondaryPdfView documentView]];
-            [[secondaryPdfView documentView] scrollPoint:point];
+            NSClipView *clipView = [[secondaryPdfView scrollView] contentView];
+            point = [secondaryPdfView convertPoint:[secondaryPdfView 
convertPoint:point fromPage:page] toView:clipView];
+            [clipView scrollPoint:point];
             [secondaryPdfView layoutDocumentView];
-            [pdfSplitView setPosition:NSHeight(frame) - [pdfSplitView 
dividerThickness] ofDividerAtIndex:0];
             [secondaryPdfView resetHistory];
             
         } else {

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to