Archived
1

The Save Button is Now Disabled if Only an Album With No Associated Tracks Is Selected

This commit is contained in:
Kim Wittenburg
2015-10-21 10:56:18 +02:00
committed by Kim Wittenburg
parent dfc3be5fd1
commit ed5e1083d6

View File

@@ -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