Explorar el Código

【数字签名】修复点击数字签名不能添加图章

wanjun hace 6 meses
padre
commit
099836e141

+ 6 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationPropertiesViewController.m

@@ -797,6 +797,10 @@
 }
 
 - (void)setOpenPropertiesType:(KMOpenPropertiesType)openPropertiesType {
+    self.contentViewController = nil;
+    self.titleLabel.stringValue = @"";
+    self.titleViewHeightConstraint.constant = 0;
+
     _openPropertiesType = openPropertiesType;
     if (openPropertiesType == KMOpenPropertiesType_PageDisplay) {
         if (self.contentViewController) {
@@ -828,14 +832,14 @@
     } else if (openPropertiesType == KMOpenPropertiesType_FormSignatureClick) {
         self.contentViewController = nil;
         self.titleLabel.stringValue = @"";
+        self.titleViewHeightConstraint.constant = 0;
         
         CPDFAnnotationModel *annotationModel = [[CPDFAnnotationModel alloc] initWithPDFAnnotations:_annotations];
         KMSignatureAnnotationViewController *vc = [[KMSignatureAnnotationViewController alloc] init];
         vc.isClickSignatureList = YES;
         vc.annotationModel = annotationModel;
         vc.pdfView = self.pdfView;
-        vc.view.frame = [self viewControllerRect];
-        [self.view addSubview:vc.view];
+        self.propertiesBox.contentView = vc.view;
         self.contentViewController = vc;
     }
 }

+ 4 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/KMRightSideViewController.swift

@@ -352,9 +352,12 @@ class KMRightSideViewController: NSViewController,CipherTextViewDelegate {
     
     
     @objc func signatureSelectedNotification(_ notification: Notification) {
+        if self.contextBox.contentView != self.annotationProperties.view {
+            self.contextBox.contentView = self.annotationProperties.view
+        }
         let editAnnotation: CPDFAnnotation = notification.object as! CPDFAnnotation
         if self.mainController?.model.rightPanelIsOpen == false {
-            self.mainController?.toggleRightPane() 
+            self.mainController?.openRightPane()
         }
         self.annotationProperties.mainController = self.mainController
         self.annotationProperties.isClickFormSignature = true;

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureAnnotationViewController.m

@@ -176,7 +176,7 @@ KMSigntureViewItemDelegate>
         
         CStampSignatureObject *sigObject = [[CStampSignatureObject alloc] initWithSignatureImage:selectedSig.pathsImage];
         self.clickSignature = selectedSig;
-        [self.pdfView setAddStampObject:sigObject keepToolModel:false];
+        [self.pdfView setAddStampObject:sigObject keepToolModel:true];
     }
     
     if (_signatures.count > 0) {

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -516,6 +516,7 @@ import Cocoa
         self.rightSideViewController.isHidden = true
         self.rightSideViewController.delegate = self
         self.rightView.addSubview(self.rightSideViewController.view)
+        self.rightSideViewController.mainController = self
         self.rightSideViewController.propertyDidChange = { [weak self] model in
             if let anno = model as? CSelfSignAnnotation {
                 self?.leftSideViewController.refreshUIForAnnoAttributeDidChange(anno, attributes: nil)