From 38b114e4ad9a7213a63428eb59a1e78875bc166d Mon Sep 17 00:00:00 2001 From: David Sansome Date: Thu, 25 Mar 2010 15:00:56 +0000 Subject: [PATCH] Show the basefilename in the title column if there's no title tag. Fixes issue #99 --- src/playlist.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/playlist.cpp b/src/playlist.cpp index ebf3398a3..dd26d43c0 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -83,7 +83,8 @@ QVariant Playlist::data(const QModelIndex& index, int role) const { // Don't forget to change Playlist::CompareItems when adding new columns switch (index.column()) { - case Column_Title: return song.title(); + case Column_Title: + return song.title().isEmpty() ? song.basefilename() : song.title(); case Column_Artist: return song.artist(); case Column_Album: return song.album(); case Column_Length: return song.length();