Don't show the artist image widget if there are no images

This commit is contained in:
David Sansome 2010-10-23 23:44:16 +00:00
parent 37ed1dc879
commit 1e3c459e7d
1 changed files with 7 additions and 5 deletions

View File

@ -47,12 +47,14 @@ void ArtistInfoView::ResultReady(int id, const SongInfoFetcher::Result& result)
Clear();
// Image view goes at the top
PrettyImageView* image_view = new PrettyImageView(this);
AddWidget(image_view);
if (!result.images_.isEmpty()) {
// Image view goes at the top
PrettyImageView* image_view = new PrettyImageView(this);
AddWidget(image_view);
foreach (const QUrl& url, result.images_) {
image_view->AddImage(url);
foreach (const QUrl& url, result.images_) {
image_view->AddImage(url);
}
}
foreach (const CollapsibleInfoPane::Data& data, result.info_) {