소스 검색

【综合】图片注释添加失效修复

tangchao 11 달 전
부모
커밋
40c50811ec

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

@@ -265,8 +265,10 @@ CGFloat DEFAULT_SNAPSHOT_HEIGHT = 200.0;
         }
         self.lastAddAnnotationPoint = bounds.origin;
         
-        KMAnnotationStamp *newAnnotation = [[KMAnnotationStamp alloc] initWithBounds:bounds];
-        newAnnotation.image = image;
+        CPDFListStampAnnotation *newAnnotation = [[CPDFListStampAnnotation alloc] initWithDocument:self.document image:image];
+        newAnnotation.bounds = bounds;
+//        KMAnnotationStamp *newAnnotation = [[KMAnnotationStamp alloc] initWithBounds:bounds];
+//        newAnnotation.image = image;
         
         [newAnnotation registerUserName];
         [self addAnnotation:newAnnotation toPage:page];

+ 9 - 8
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -3187,17 +3187,18 @@ extension KMMainViewController {
         openPanel.allowedFileTypes = KMImageAccessoryController.supportedImageTypes()
         openPanel.allowsMultipleSelection = false
         openPanel.accessoryView = accessoryCtr.view
-        if #available(macOS 10.11, *) {
+//        if #available(macOS 10.11, *) {
             openPanel.canSelectHiddenExtension = true
-        }
+//        }
         openPanel.beginSheetModal(for: NSApp.mainWindow!) { [self] (result) in
-            if result == NSApplication.ModalResponse.OK {
-                guard let url = openPanel.url else { return }
+            if result == .OK {
+                guard let url = openPanel.url else {
+                    return
+                }
                 let filePath = url.path
-                
                 if filePath.pathExtension.lowercased() == "pdf" {
                     if let pdf = PDFDocument(url: url), pdf.isEncrypted {
-                        __NSBeep()
+                        NSSound.beep()
                         return
                     }
                 }
@@ -4856,7 +4857,7 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
 extension KMMainViewController {
     override func mouseDown(with event: NSEvent) {
         super.mouseDown(with: event)
-        KMPrint("KMMainViewController mouseDown")
+//        KMPrint("KMMainViewController mouseDown")
         self.leftSideViewCancelSelect()
         self.pageNumberDisplayView.isEdit = false
     }
@@ -4893,7 +4894,7 @@ extension KMMainViewController {
                     }
                 }
             }
-            KMPrint("其他")
+//            KMPrint("其他")
 //        }
     }
 }

+ 48 - 0
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -418,6 +418,38 @@
             endingLineNumber = "2413"
             landmarkName = "pdfViewEditingAreaDidChanged(_:)"
             landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "AEC34DED-6D20-41DF-9D3F-E270C9C7D827 - 330bc2a72cc115d9"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewEditingAreaDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2413"
+                  endingLineNumber = "2413"
+                  offsetFromSymbolStart = "217">
+               </Location>
+               <Location
+                  uuid = "AEC34DED-6D20-41DF-9D3F-E270C9C7D827 - 330bc2a72cc115d9"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMMainViewController.pdfViewEditingAreaDidChanged(Swift.Optional&lt;__C.CPDFView&gt;) -&gt; ()"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/kdanmobile/work/tangchao/git/PDFOffice/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "2413"
+                  endingLineNumber = "2413"
+                  offsetFromSymbolStart = "457">
+               </Location>
+            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -580,5 +612,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "731C5ABD-4DB1-4223-BE4C-E048DCF6FE76"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "846"
+            endingLineNumber = "846"
+            landmarkName = "-addAnnotationWithImage:page:point:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>