Don't count the length of tracks that don't have a length

This commit is contained in:
David Sansome 2010-06-18 15:32:52 +00:00
parent d3be5a4215
commit d2f2eb89e0
1 changed files with 3 additions and 1 deletions

View File

@ -205,7 +205,9 @@ void PlaylistManager::UpdateSummaryText() {
foreach (const QItemSelectionRange& range, current_selection_) {
selected += range.bottom() - range.top() + 1;
for (int i=range.top() ; i<=range.bottom() ; ++i) {
seconds += range.model()->index(i, Playlist::Column_Length).data().toInt();
int length = range.model()->index(i, Playlist::Column_Length).data().toInt();
if (length > 0)
seconds += length;
}
}