4 Commits e7d6dc39b4 ... a032b15a20

Author SHA1 Message Date
  liaoxiaoyue a032b15a20 【左边栏】- 大纲列表添加上一级无效,进入编辑状态效果处理 1 year ago
  liaoxiaoyue 1fb5306891 【左边栏】- 书签第一行点击无效处理 1 year ago
  liaoxiaoyue b5fcaa4657 【左边栏】- BOTA:注释列表崩溃修复 1 year ago
  liaoxiaoyue d845ffcd83 【左边栏】- BOTA:注释列表Ink,图章注释预览图展示 1 year ago

+ 1 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMAnnotationTableCellView.swift

@@ -107,7 +107,7 @@ class KMAnnotationTableCellView: NSTableCellView {
                     (annotation.isKind(of: CPDFLineAnnotation.self)) ||
                     (annotation.isKind(of: CPDFCircleAnnotation.self)) {
             contentInfoImg.isHidden = false
-            contentInfoImg.image = NSImage(named:"KMImageNameNewTipSelected")
+            contentInfoImg.image = CPDFAnnotationModel(pdfAnnotations: [annotation]).annotationImage
         }
         
         if annotation.contents != nil && annotation.contents != "" {

+ 3 - 3
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteTypeImageView.m

@@ -58,9 +58,9 @@ NSString *SKNRedactString = @"SKNRedactString";
     if (@available(macOS 10.14, *)) {
         NSAppearanceName appearanceName = [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
         if ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
-            strikePath = @"KMImageNameAnnotationStrikeoutDrak";
-            highlight = @"KMImageNameAnnotationHightlightDrak";
-            underline = @"KMImageNameAnnotationUnderlineDrak";
+            strikePath = @"KMImageNameAnnotationStrikeout";
+            highlight = @"KMImageNameAnnotationStrikeout";
+            underline = @"KMImageNameAnnotationStrikeout";
             inkImagePath = @"KMImageNameAnnotationFreehandDrak";
         }
     }

+ 1 - 1
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/BookMarks/KMBookMarkViewController.swift

@@ -288,7 +288,7 @@ extension KMBookMarkViewController : NSTableViewDelegate,NSTableViewDataSource {
     }
     
     func tableViewSelectionDidChange(_ notification: Notification) {
-        if(self.bookTableView.selectedRow > 0 && self.bookTableView.selectedRow < self.dataSource.count) {
+        if(self.bookTableView.selectedRow >= 0 && self.bookTableView.selectedRow < self.dataSource.count) {
             let selectBookMark = self.dataSource[self.bookTableView.selectedRow]
             self.listView.go(toPageIndex: selectBookMark.pageIndex, animated: true)
             

+ 6 - 2
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Outline/KMOutlineViewController.swift

@@ -208,8 +208,9 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
             __NSBeep()
         } else {
             let currentPDFOutline  = self.outlineView.item(atRow: selectedRowIndexes.last!) as! CPDFOutline
-            let parent = currentPDFOutline.parent
+            var parent = currentPDFOutline.parent
             let index = NSInteger(parent!.index) + 1
+            parent = parent?.parent
             if parent != nil {
                 self.addPDFOutlineToIndex(index: index, atParent: parent)
             } else {
@@ -320,10 +321,10 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
     }
     
     func renamePDFOutline(outline : CPDFOutline! , label:String) {
+        self.renameTextField.isEditable = false
         if outline.label == label {
             return
         }
-        
         outline.label = label
         self.outlineView.reloadData()
         
@@ -390,6 +391,9 @@ class KMOutlineViewController: NSViewController,NSMenuItemValidation {
         for i in 0..<numRows {
             let tPDFOutline = self.outlineView.item(atRow: i) as! CPDFOutline
             let tPage = tPDFOutline.destination.pageIndex
+            if tPage < 0 {
+                continue
+            }
             var page = self.listView.document.page(at: UInt(tPage))!
             var tDict : [String : CPDFPage] = ["\(i)":page]
             arr.append(tDict)