Parcourir la source

【综合】页面编辑 删除页面,bota中的缩略图页数未变,出现一张空白页面(已修复)

tangchao il y a 1 an
Parent
commit
86c866a077

+ 7 - 0
PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift

@@ -55,6 +55,10 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     
     // index=1 双击退出;index=2 打印
     var itemClick: KMCommonClickBlock?
+    private var _isEdited = false
+    var isEdited: Bool {
+        return self._isEdited
+    }
     var documentEditedCallback: KMCommonBlock?
     var selectionDidChange: KMPDFEditViewControllerSelectionDidChange?
     
@@ -123,6 +127,7 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     override func viewDidLoad() {
         super.viewDidLoad()
         
+        self._isEdited = false
         // 显示拖放移动动效
 //        self.thumbnailView.dragMoveEffectAnimated = true
 //        self.thumbnailView.collectionView.backgroundColor(NSColor.km_init(hex: "#CED0D4"))
@@ -273,6 +278,8 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     fileprivate func dealPdfDocumentDidEditCallback(type: KMPageEditType = .none) {
+        self._isEdited = true
+        
         // 提醒外面文档已编辑
         guard let callback = self.documentEditedCallback else {
             return

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

@@ -969,6 +969,10 @@ let LOCKED_KEY  = "locked"
         self.listView.annotationType = .unkown
         
         self.listView.go(toPageIndex: editController!.listViewCurrentIndex, animated: false)
+        
+        if let data = editController?.isEdited, data {
+            self.leftSideViewController.reloadThumbnailDataIfNeed()
+        }
     }
     
     open func hasEnterPageEdit() -> Bool {

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

@@ -708,5 +708,21 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2B66DACB-5722-4DB0-91F0-074284BA7E5A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Thumbnail.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "14"
+            endingLineNumber = "14"
+            landmarkName = "refreshUIOfThumbnailIfNeed(preference:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>