Fix artwork selection
This commit is contained in:
1 file changed
+2
-2
@@ -385,7 +385,7 @@ class ArtworkSelectorController: NSWindowController, NSCollectionViewDataSource,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func selectArtwork(at index: Int) {
|
private func selectArtwork(at index: Int) {
|
||||||
let indexPath = IndexPath(item: 0, section: 0)
|
let indexPath = IndexPath(item: index, section: 0)
|
||||||
imageBrowser.selectItems(at: [indexPath], scrollPosition: .top)
|
imageBrowser.selectItems(at: [indexPath], scrollPosition: .top)
|
||||||
addArtworkButton.isEnabled = imageBrowser.selectionIndexPaths.isEmpty == false
|
addArtworkButton.isEnabled = imageBrowser.selectionIndexPaths.isEmpty == false
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,7 @@ class ArtworkSelectorController: NSWindowController, NSCollectionViewDataSource,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func selectedArtworks() -> [ArtworkImageObject] {
|
private func selectedArtworks() -> [ArtworkImageObject] {
|
||||||
return imageBrowser.selectionIndexes.map { artworks[$0] }
|
return imageBrowser.selectionIndexPaths.map { artworks[$0.item] }
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Finishing Up
|
// MARK: - Finishing Up
|
||||||
|
|||||||
Reference in new issue
Block a user