Просмотр исходного кода

【BOTA】快照模块,删除全部功能调式

tangchao 1 год назад
Родитель
Сommit
a7765f504f

+ 0 - 32
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -356,22 +356,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "126BE12D-BE41-4A4B-85C1-3995C2619600"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFTools/Snapshot/Window/KMSnapshotWindowController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "112"
-            endingLineNumber = "112"
-            landmarkName = "KMSnapshotWindowController"
-            landmarkType = "3">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -388,22 +372,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "066B7A1B-B782-456C-973E-47F5A56D476E"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "5413"
-            endingLineNumber = "5413"
-            landmarkName = "deleteAllSnapshot(_:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent

+ 3 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -5410,7 +5410,9 @@ extension KMLeftSideViewController {
     }
     
     @objc func deleteAllSnapshot(_ sender: AnyObject?) {
-        KMPrint("KMLeftSideViewController-deleteAllSnapshot...")
+        for model in self.snapshots {
+            model.windowC?.close()
+        }
     }
     
     private func _snapshotListIsAllSelected() -> Bool {

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

@@ -2343,7 +2343,21 @@ extension KMMainViewController: KMEditImagePropertyViewControllerDelegate {
 
 extension KMMainViewController: KMSnapshotWindowControllerDelegate {
     func snapshotControllerWillClose(_ controller: KMSnapshotWindowController) {
-//        [[self mutableArrayValueForKey:SNAPSHOTS_KEY] removeObject:controller];
+        var flag: KMSnapshotModel?
+        for model in self.leftSideViewController.snapshots {
+            if controller.isEqual(model.windowC) {
+                flag = model
+            }
+        }
+        if flag != nil {
+            self.leftSideViewController.snapshots.removeObject(flag!)
+            Task { @MainActor in
+                self.leftSideViewController.snapshotTableView.reloadData()
+                if self.leftSideViewController.snapshots.isEmpty {
+                    self.leftSideViewController.leftView.segmentedControl.selectedSegment = 3
+                }
+            }
+        }
     }
     
     func snapshotController(_ controller: KMSnapshotWindowController, miniaturizedRect isMiniaturize: Bool) -> NSRect {