ソースを参照

【fix】【注释】隐藏注释状态,表格单元格内的文本还是会显示

tangchao 5 ヶ月 前
コミット
0d4e389ef0

+ 13 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Table/KMTableAnnotation.m

@@ -726,6 +726,19 @@
 
 - (void)drawWithBox:(CPDFDisplayBox)box inContext:(CGContextRef)context
 {
+    if (self.annotationShouldDisplay == false && self.shouldDisplay == false) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            self.textView.hidden = YES;
+        });
+        
+        [super drawWithBox:box inContext:context];
+        return;
+    }
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        self.textView.hidden = NO;
+    });
+    
     [NSGraphicsContext saveGraphicsState];
     if (context) {
         [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO]];