|
@@ -54,6 +54,7 @@ class KMNThumbnailBaseViewController: KMNBaseViewController,NSCollectionViewDele
|
|
|
|
|
|
private var currentDocument:CPDFDocument?
|
|
|
private var isChangeIndexPaths = false
|
|
|
+ private var selectCount = 0 //防止点击缩图后 listview回调
|
|
|
|
|
|
var lockedFiles: [URL] = []
|
|
|
var filePromiseQueue: OperationQueue = {
|
|
@@ -152,6 +153,11 @@ class KMNThumbnailBaseViewController: KMNBaseViewController,NSCollectionViewDele
|
|
|
|
|
|
var selectionIndexPaths: Set<IndexPath> = [] {
|
|
|
didSet {
|
|
|
+ if selectCount != 0 {
|
|
|
+ selectCount -= 1
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
pdfviewSelectionIndexPaths = selectionIndexPaths
|
|
|
var indexpaths: Set<IndexPath> = []
|
|
|
for indexpath in selectionIndexPaths {
|
|
@@ -413,6 +419,8 @@ class KMNThumbnailBaseViewController: KMNBaseViewController,NSCollectionViewDele
|
|
|
|
|
|
func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
|
|
|
if isChangeIndexPaths == false {
|
|
|
+ selectCount += 1
|
|
|
+
|
|
|
let indexpathsz = collectionView.selectionIndexPaths
|
|
|
let dex:IndexSet = KMNTools.indexpathsToIndexs(indexpaths: indexpathsz)
|
|
|
let selectedIndexPathsString = KMNTools.parseIndexSet(indexSet: dex)
|