The Save Button is Now Disabled if Only an Album With No Associated Tracks Is Selected
This commit is contained in:
committed by
Kim Wittenburg
parent
dfc3be5fd1
commit
ed5e1083d6
@@ -686,7 +686,15 @@ extension MainViewController: NSUserInterfaceValidations {
|
||||
private func canSave() -> Bool {
|
||||
for row in outlineView.selectedRowIndexes {
|
||||
if sectionOfRow(row) == .Albums {
|
||||
return true
|
||||
if let album = outlineView.itemAtRow(row) as? Album {
|
||||
for track in album.tracks {
|
||||
if !track.associatedTracks.isEmpty {
|
||||
return true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user