Browse Source

Merge branch 'develop_PDFReaderProV4.6.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProV4.6.0

tangchao 6 months ago
parent
commit
2fd9648ec0

+ 7 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -251,6 +251,13 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
     
     [self resetPDFToolTipRectsForAfterDelay];
     
+    for(NSInteger i = 0;i<self.document.pageCount;i++) {
+        CPDFPage *page = [self.document pageAtIndex:i];
+        for (CPDFAnnotation *annotation in page.annotations) {
+            [[NSNotificationCenter defaultCenter] postNotificationName:CPDFPageDidLoadAnnotationNotification object:annotation];
+        }
+    }
+    
     [self.window makeFirstResponder:self];
     
 }

+ 0 - 7
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+UndoManager.m

@@ -27,13 +27,6 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(PDFPageDidLoadAnnotationNotification:) name:@"CPDFPageDidLoadAnnotationNotification" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(PDFPageDidAddAnnotationNotification:) name:@"CPDFPageDidAddAnnotationNotification" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(PDFPageDidRemoveAnnotationNotification:) name:@"CPDFPageDidRemoveAnnotationNotification" object:nil];
-    
-    for(NSInteger i = 0;i<self.document.pageCount;i++) {
-        CPDFPage *page = [self.document pageAtIndex:i];
-        for (CPDFAnnotation *annotation in page.annotations) {
-            [[NSNotificationCenter defaultCenter] postNotificationName:CPDFPageDidLoadAnnotationNotification object:annotation];
-        }
-    }
 }
 
 - (void)startObservingNotes:(NSArray *)newNotes {