Browse Source

【页面编辑】从一个文档的缩略图/页面编辑复制,到另一个文档的缩略图/页面编辑进行粘贴,会粘贴在选中的页面之前,应该是之后才对

lizhe 1 year ago
parent
commit
2c2adee0a5

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/Base/KMPDFThumbViewBaseController.swift

@@ -561,7 +561,7 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
                 self.thumbnailView.collectionView.animator().scrollToItems(at: indexpaths, scrollPosition: .top)
             }
         } else {
-            let index = (self.thumbnailView.collectionView.selectionIndexes).last ?? Int(self.thumbnailView.document?.pageCount ?? 0)
+            let index = ((self.thumbnailView.collectionView.selectionIndexes).last ?? Int(self.thumbnailView.document?.pageCount ?? 0)) + 1
             debugPrint("不是同一个document")
             let url = URL(fileURLWithPath: KMThumbnailManager.manager.tempCopyFilePath)
 //            self.thumbnailView(thumbanView: self.thumbnailView, didDragAddFiles: [url], indexpath: NSIndexPath(forItem: index, inSection: 0) as IndexPath)