From 8237dcf001edfb78483df603da931cfc8d09a105 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 12 Oct 2014 10:11:21 +0200 Subject: [PATCH] Inbox needs to set its own TrackView on ContextView. --- src/libtomahawk/playlist/InboxView.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/playlist/InboxView.cpp b/src/libtomahawk/playlist/InboxView.cpp index c739c89ae..d9b2bcfba 100644 --- a/src/libtomahawk/playlist/InboxView.cpp +++ b/src/libtomahawk/playlist/InboxView.cpp @@ -80,13 +80,15 @@ InboxView::onMenuTriggered( int action ) InboxPage::InboxPage( QWidget* parent ) : PlaylistViewPage( parent ) { + InboxView* inboxView = new InboxView( this ); view()->setCaption( tr( "Inbox Details" ) ); setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::Inbox ) ); - view()->trackView()->setPlayableModel( ViewManager::instance()->inboxModel() ); - view()->trackView()->setEmptyTip( tr( "Your friends have not shared any recommendations with you yet. Connect with them and share your musical gems!" ) ); + TrackItemDelegate* delegate = new TrackItemDelegate( TrackItemDelegate::Inbox, inboxView, inboxView->proxyModel() ); + inboxView->setPlaylistItemDelegate( delegate ); - TrackItemDelegate* delegate = new TrackItemDelegate( TrackItemDelegate::Inbox, view()->trackView(), view()->trackView()->proxyModel() ); - view()->trackView()->setPlaylistItemDelegate( delegate ); + view()->setTrackView( inboxView ); + inboxView->setPlayableModel( ViewManager::instance()->inboxModel() ); + inboxView->setEmptyTip( tr( "Your friends have not shared any recommendations with you yet. Connect with them and share your musical gems!" ) ); }