فهرست منبع

【BOTA】隐藏显示注释

lizhe 1 سال پیش
والد
کامیت
7cfb75648e

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

@@ -262,7 +262,7 @@ NSNotificationName const CPDFListViewAnnotationsAttributeHasChangeNotification =
     for(NSInteger i = 0;i<self.document.pageCount;i++) {
         CPDFPage *page = [self.document pageAtIndex:i];
         for (CPDFAnnotation *annotation in page.annotations) {
-//            [annotation setAnnotationShouldDisplay:!self.hideNotes];
+            [annotation setAnnotationShouldDisplay:!self.hideNotes];
             [annotation setHidden: self.hideNotes];
         }
     }

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -198,7 +198,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
     
     CPDFAnnotation *newActiveAnnotation = nil;
     for (CPDFAnnotation *annotation in annotations) {
-        if ([annotation hitTest:point] && [annotation isHidden]) {
+        if ([annotation hitTest:point] && [annotation annotationShouldDisplay]) {
             newActiveAnnotation = annotation;
             break;
         }
@@ -2616,7 +2616,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
     id annotations = [page annotations];
     
     for (CPDFAnnotation *annotation in annotations) {
-        if ([annotation hitTest:point] && [annotation isHidden] ) {
+        if ([annotation hitTest:point] && [annotation annotationShouldDisplay] ) {
             newActiveAnnotation = annotation;
             break;
         }

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/KMAnnotationViewController.swift

@@ -155,7 +155,7 @@ extension KMAnnotationViewController {
                 }
                 
                 for annotation in pageAnnotations {
-                    if annotation.isHidden() {
+                    if annotation.annotationShouldDisplay() == false {
                         pageAnnotations.removeObject(annotation)
                     }
                 }

+ 4 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMPDFThumbnailItem.swift

@@ -76,7 +76,10 @@ class KMPDFThumbnailItem: NSCollectionViewItem {
         didSet {
             if self.annotationShowState == .hidden {
                 for annotation in self.page.annotations {
-                    annotation.setHidden(true)
+                    if annotation.annotationShouldDisplay() == false {
+                        annotation.setHidden(true)
+                    }
+
                 }
             } else {
                 for annotation in self.page.annotations {