Browse Source

UndoRedo - 【填写与签名】注释属性undoRedo效果补充

wanjun 1 year ago
parent
commit
814de84d32

+ 8 - 0
PDF Office/PDF Office/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationHeader.h

@@ -79,4 +79,12 @@ static NSString *CPDFListViewAnnotationKey = @"annotation";
 
 static NSString *CPDFAnnotationPropertiesObservationContext = @"CPDFAnnotationPropertiesObservationContext";
 
+static NSString *CPDFSelfSignTypeKey = @"annotationType";
+
+static NSString *CPDFSelfSignLineColorKey = @"lineColor";
+
+static NSString *CPDFSelfSignLineOpacityKey = @"lineOpacity";
+
+static NSString *CPDFSelfSignLineAnnotationWidthKey = @"lineAnnotationWidth";
+
 #endif /* CPDFAnnotationHeader_h */

+ 4 - 1
PDF Office/PDF Office/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFStampAnnotation+PDFListView.m

@@ -78,7 +78,10 @@
 - (NSSet *)keysForValuesToObserveForUndo {
     NSMutableSet *mutableKeys = [NSMutableSet set];
     if ([self isKindOfClass:[CSelfSignAnnotation class]]) {
-        [mutableKeys addObject:@"annotationType"];
+        [mutableKeys addObject:CPDFSelfSignTypeKey];
+        [mutableKeys addObject:CPDFSelfSignLineColorKey];
+        [mutableKeys addObject:CPDFSelfSignLineOpacityKey];
+        [mutableKeys addObject:CPDFSelfSignLineAnnotationWidthKey];
     } else {
         mutableKeys = [[super keysForValuesToObserveForUndo] mutableCopy];
     }