소스 검색

PDFTools(iOS) - 注释为空的时候不能remove

chenyu 1 년 전
부모
커밋
b439a545a4
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView+UndoManager.m

+ 1 - 0
compdfkit-tools/compdfkit-tools/Common/Views/PDFView/PDFListView/CPDFListView+UndoManager.m

@@ -77,6 +77,7 @@ static NSString *CPDFAnnotationPropertiesObservationContext = @"CPDFAnnotationPr
         [self updateActiveAnnotations:@[]];
     
     [self setNeedsDisplayForPage:page];
+    if(self.activeAnnotations.count > 0)
     [page removeAnnotation:annotation];
 }