Ver Fonte

【分屏视图】打开一个普通文档,再打开一个加密文档,滑动页面概率性崩溃,后者滑动页面切换分屏模式必现崩溃 -- 优化

lizhe há 11 meses atrás
pai
commit
86b44e5b4f

+ 6 - 6
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift

@@ -614,13 +614,13 @@ class KMSecondaryPDFView: CPDFListView {
     }
     
     @objc func handlePageChangedNotification(_ notification: Notification) {
-        if !self.document.isLocked {
-            self.pagePopUpButton?.selectItem(at: self.currentPageIndex)
-        }
+//        if self.document != nil && !self.document.isLocked {
+//            self.pagePopUpButton?.selectItem(at: self.currentPageIndex)
+//        }
     }
     
     @objc func handleSynchronizedScaleChangedNotification(_ notification: Notification) {
-        if !self.document.isLocked {
+        if self.document != nil && !self.document.isLocked {
             if self.synchronizeZoom {
                 self.scaleFactor = self.synchronizedPDFView?.scaleFactor ?? 0.0
             }
@@ -628,13 +628,13 @@ class KMSecondaryPDFView: CPDFListView {
     }
     
     @objc func handleDocumentDidUnlockNotification(_ notification: Notification) {
-        if !self.document.isLocked {
+        if self.document != nil && !self.document.isLocked {
             self.reloadPagePopUpButton()
         }
     }
     
     @objc func handlePDFViewScaleChangedNotification(_ notification: Notification) {
-        if !self.document.isLocked {
+        if self.document != nil && !self.document.isLocked {
             if self.autoScales == false && self.synchronizeZoom == false {
                 self.setScaleFactor(fmax(self.scaleFactor, SKMinDefaultScaleMenuFactor), adjustPopup: true)
             }

+ 112 - 127
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -22068,85 +22068,6 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "6051E63B-8F27-4890-9C49-1C6F7A899D7A"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "3263"
-            endingLineNumber = "3263"
-            landmarkName = "changePDFDocument(isChange:replaceBlock:)"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "9FFD8F7A-6DF6-4AC7-B899-8C15E30C1C75"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "303"
-            endingLineNumber = "303"
-            landmarkName = "reloadReplaceView()"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "9FFD8F7A-6DF6-4AC7-B899-8C15E30C1C75 - ff7477581552daf8"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMPageDisplayPropertiesViewController.reloadReplaceView() -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "303"
-                  endingLineNumber = "303"
-                  offsetFromSymbolStart = "300">
-               </Location>
-               <Location
-                  uuid = "9FFD8F7A-6DF6-4AC7-B899-8C15E30C1C75 - ff7477581552daf8"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMPageDisplayPropertiesViewController.reloadReplaceView() -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "303"
-                  endingLineNumber = "303"
-                  offsetFromSymbolStart = "1144">
-               </Location>
-               <Location
-                  uuid = "9FFD8F7A-6DF6-4AC7-B899-8C15E30C1C75 - ff7477581552daf8"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMPageDisplayPropertiesViewController.reloadReplaceView() -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "303"
-                  endingLineNumber = "303"
-                  offsetFromSymbolStart = "1112">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -22195,54 +22116,6 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "D29DFD90-8E9C-4F4F-9E95-46688913DCFD"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "3469"
-            endingLineNumber = "3469"
-            landmarkName = "receivedFileUrl(_:)"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "D29DFD90-8E9C-4F4F-9E95-46688913DCFD - fe2a8ed965fed509"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.receivedFileUrl(Swift.Optional&lt;Foundation.URL&gt;) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "3469"
-                  endingLineNumber = "3469"
-                  offsetFromSymbolStart = "436">
-               </Location>
-               <Location
-                  uuid = "D29DFD90-8E9C-4F4F-9E95-46688913DCFD - fe2a8ed965fed509"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMMainViewController.receivedFileUrl(Swift.Optional&lt;Foundation.URL&gt;) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "3469"
-                  endingLineNumber = "3469"
-                  offsetFromSymbolStart = "200">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -22668,5 +22541,117 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "5CE7A350-E8EE-4573-A6C7-8F0B7D31D7DA"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "269"
+            endingLineNumber = "269"
+            landmarkName = "document"
+            landmarkType = "24">
+            <Locations>
+               <Location
+                  uuid = "5CE7A350-E8EE-4573-A6C7-8F0B7D31D7DA - e2b4a2f7e0c122bd"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMSecondaryPDFView.document.setter : Swift.Optional&lt;__C.CPDFDocument&gt;"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "269"
+                  endingLineNumber = "269"
+                  offsetFromSymbolStart = "108">
+               </Location>
+               <Location
+                  uuid = "5CE7A350-E8EE-4573-A6C7-8F0B7D31D7DA - e2b4a2f7e0c122bd"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "PDF_Reader_Pro.KMSecondaryPDFView.document.setter : Swift.Optional&lt;__C.CPDFDocument&gt;"
+                  moduleName = "PDF Reader Pro"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Volumes/Data/Company/kdan/Projects/PDF%20Office/PDF%20Office/PDF%20Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "269"
+                  endingLineNumber = "269"
+                  offsetFromSymbolStart = "120">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "DCD407F2-A209-460B-86BA-1E21AC9264BB"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/Split/View/KMSecondaryPDFView.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "617"
+            endingLineNumber = "617"
+            landmarkName = "handlePageChangedNotification(_:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "55BF3ECA-619A-4F26-8BF7-E0D31F351D53"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "3409"
+            endingLineNumber = "3409"
+            landmarkName = "displaySecondaryPDFView(withUrl:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "7E980B49-860E-44EC-9460-9882CD4BD817"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "3296"
+            endingLineNumber = "3296"
+            landmarkName = "displaySinglePageScreen(isSinglePage:doublePageScreen:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "285BFD1C-0ABC-4F47-B467-076A86EA2F18"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "2637"
+            endingLineNumber = "2637"
+            landmarkName = "handlePageBoundsDidChange(page:action:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>