|
@@ -461,10 +461,14 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
|
|
|
// 在当前选中item之后插入
|
|
|
// 多选时,则取最后一页
|
|
|
- for indexpath in self.thumbnailView.selectionIndexPaths.sorted() {
|
|
|
- index = indexpath.item
|
|
|
+// for indexpath in self.thumbnailView.selectionIndexPaths.sorted() {
|
|
|
+// index = indexpath.item
|
|
|
+// }
|
|
|
+ let indexpaths = self.thumbnailView.selectionIndexPaths.sorted()
|
|
|
+ if indexpaths.isEmpty {
|
|
|
+ return self.listView?.currentPageIndex ?? 0
|
|
|
}
|
|
|
- return index
|
|
|
+ return indexpaths.first!.item
|
|
|
}
|
|
|
|
|
|
override func splitAction() {
|
|
@@ -902,6 +906,8 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
}
|
|
|
|
|
|
let windowC = KMPDFEditInsertBlankPageWindow(document: self.pdfDocument!)
|
|
|
+ windowC.currentPage = self.getSelecteIndex() + 1
|
|
|
+ windowC.insertLocation = 3
|
|
|
windowC.callback = { [weak self] pdfDoc, _, pages, insertI in
|
|
|
if let _pages = pages {
|
|
|
// self?.insertPages(pages: _pages, at: IndexSet(integer: insertI+1))
|