|
@@ -278,6 +278,10 @@ class KMPDFEditViewController: NSViewController {
|
|
|
if (self.documentEditedCallback != nil) {
|
|
|
self.documentEditedCallback!()
|
|
|
}
|
|
|
+
|
|
|
+ var indexpaths: Set<IndexPath> = []
|
|
|
+ indexpaths.insert(IndexPath(item: index, section: 0))
|
|
|
+ self.thumbnailView.collectionView.animator().scrollToItems(at: indexpaths, scrollPosition: .top)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1603,7 +1607,7 @@ extension KMPDFEditViewController: KMEditMenuProtocol {
|
|
|
}
|
|
|
|
|
|
@IBAction func paste(_ sender: Any) {
|
|
|
- var index: Int = 0
|
|
|
+ var index: Int = Int(self.thumbnailView.document.pageCount-1)
|
|
|
let indexSet = self.thumbnailView.collectionView.selectionIndexes
|
|
|
if (indexSet.isEmpty == false) {
|
|
|
index = indexSet.last!
|