Revision: 16193
          http://sourceforge.net/p/skim-app/code/16193
Author:   hofman
Date:     2026-04-08 16:01:24 +0000 (Wed, 08 Apr 2026)
Log Message:
-----------
check for presentation notes document from show method

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

Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m   2026-04-08 14:05:49 UTC (rev 
16192)
+++ trunk/SKMainWindowController_FullScreen.m   2026-04-08 16:01:24 UTC (rev 
16193)
@@ -140,7 +140,11 @@
 #pragma mark Presentation Support Methods
 
 - (void)showNotesForPresentationWindow:(NSWindow *)window {
-    PDFDocument *pdfDoc = [[self presentationNotesDocument] pdfDocument];
+    NSDocument *notesDocument = [self presentationNotesDocument];
+    if (notesDocument == nil)
+        return;
+    
+    PDFDocument *pdfDoc = [notesDocument pdfDocument];
     NSInteger offset = [self presentationNotesOffset];
     NSUInteger pageIndex = MAX(0, MIN((NSInteger)[pdfDoc pageCount], 
(NSInteger)[[pdfView currentPage] pageIndex] + offset));
     
@@ -147,7 +151,7 @@
     if (presentationNotesAuxiliary == nil)
         presentationNotesAuxiliary = [[SKPresentationNotesAuxiliary alloc] 
init];
     
-    if ([self presentationNotesDocument] == [self document]) {
+    if (notesDocument == [self document]) {
         SKSnapshotWindowController *preview = [[SKSnapshotWindowController 
alloc] init];
         
         [presentationNotesAuxiliary setPreviewController:preview];
@@ -161,7 +165,7 @@
     
         [[self document] addWindowController:preview];
     } else {
-        [[self presentationNotesDocument] setCurrentPage:[pdfDoc 
pageAtIndex:pageIndex]];
+        [notesDocument setCurrentPage:[pdfDoc pageAtIndex:pageIndex]];
     }
     [self addPresentationNotesNavigation];
 }
@@ -263,8 +267,7 @@
     
     [presentationWindow orderFront:nil];
     
-    if ([self presentationNotesDocument])
-        [self showNotesForPresentationWindow:presentationWindow];
+    [self showNotesForPresentationWindow:presentationWindow];
     
     BOOL shouldFadeOut = NO;
     if ([[normalWindow tabbedWindows] count] > 1) {

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