Revision: 13660
          http://sourceforge.net/p/skim-app/code/13660
Author:   hofman
Date:     2023-09-11 09:38:28 +0000 (Mon, 11 Sep 2023)
Log Message:
-----------
set shouldDisplay and shouldPrint from window controller

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2023-09-11 09:11:08 UTC (rev 13659)
+++ trunk/SKMainWindowController.m      2023-09-11 09:38:28 UTC (rev 13660)
@@ -2347,6 +2347,8 @@
     if ([self interactionMode] == SKPresentationMode && [undoManager 
isUndoing] == NO && [undoManager isRedoing] == NO) {
         [[[self presentationUndoManager] 
prepareWithInvocationTarget:[notification object]] removeAnnotation:annotation];
         
+        [annotation setShouldDisplay:YES];
+        [annotation setShouldPrint:NO];
         if (presentationNotes == nil)
             presentationNotes = [[NSMutableArray alloc] init];
         [presentationNotes addObject:annotation];
@@ -2355,6 +2357,10 @@
     } else {
         [[undoManager prepareWithInvocationTarget:[notification object]] 
removeAnnotation:annotation];
         
+        if ([annotation isSkimNote]) {
+            [annotation setShouldDisplay:[pdfView hideNotes] == NO];
+            [annotation setShouldPrint:[pdfView hideNotes] == NO];
+        }
         if ([annotation isSkimNote] && mwcFlags.addOrRemoveNotesInBulk == 0) {
             mwcFlags.updatingNoteSelection = 1;
             [[self mutableArrayValueForKey:NOTES_KEY] addObject:annotation];

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2023-09-11 09:11:08 UTC (rev 13659)
+++ trunk/SKPDFView.m   2023-09-11 09:38:28 UTC (rev 13660)
@@ -3271,11 +3271,6 @@
     PDFAnnotation *annotation = [userInfo 
objectForKey:SKPDFDocumentAnnotationKey];
     PDFPage *page = [userInfo objectForKey:SKPDFDocumentPageKey];
     
-    if ([annotation isSkimNote]) {
-        [annotation setShouldDisplay:pdfvFlags.hideNotes == NO || 
interactionMode == SKPresentationMode];
-        [annotation setShouldPrint:pdfvFlags.hideNotes == NO && 
interactionMode != SKPresentationMode];
-    }
-    
     [self setNeedsDisplayForAnnotation:annotation];
     [self annotationsChangedOnPage:page];
     [self resetPDFToolTipRects];

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