Fixed an issue where TagTunes would crash when the user selected an outdated track
This commit is contained in:
committed by
Kim Wittenburg
parent
f75c16cb27
commit
dfc3be5fd1
@@ -684,20 +684,9 @@ extension MainViewController: NSUserInterfaceValidations {
|
||||
}
|
||||
|
||||
private func canSave() -> Bool {
|
||||
for row in outlineView.selectedRowIndexes where sectionOfRow(row) == .Albums {
|
||||
let item = outlineView.itemAtRow(row)
|
||||
if let album = item as? Album {
|
||||
if !album.saved {
|
||||
return true
|
||||
}
|
||||
} else if let track = item as? Track {
|
||||
if !track.saved {
|
||||
return true
|
||||
}
|
||||
} else if let track = item as? iTunesTrack {
|
||||
if parentForTrack(track)?.saved == false {
|
||||
return true
|
||||
}
|
||||
for row in outlineView.selectedRowIndexes {
|
||||
if sectionOfRow(row) == .Albums {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user