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

View File

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