diff --git a/src/libtomahawk/playlist/TreeView.cpp b/src/libtomahawk/playlist/TreeView.cpp index 31299e766..ae6580f13 100644 --- a/src/libtomahawk/playlist/TreeView.cpp +++ b/src/libtomahawk/playlist/TreeView.cpp @@ -139,7 +139,6 @@ TreeView::setTreeModel( TreeModel* model ) connect( m_proxyModel, SIGNAL( filteringStarted() ), SLOT( onFilteringStarted() ) ); connect( m_proxyModel, SIGNAL( filteringFinished() ), m_loadingSpinner, SLOT( fadeOut() ) ); - connect( m_model, SIGNAL( itemCountChanged( unsigned int ) ), SLOT( onItemCountChanged( unsigned int ) ) ); connect( m_proxyModel, SIGNAL( filteringFinished() ), SLOT( onFilterChangeFinished() ) ); connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) ); @@ -287,23 +286,6 @@ TreeView::resizeEvent( QResizeEvent* event ) } -void -TreeView::onItemCountChanged( unsigned int items ) -{ - if ( items == 0 ) - { - if ( m_model->collection().isNull() || ( !m_model->collection().isNull() && m_model->collection()->source()->isLocal() ) ) - m_overlay->setText( tr( "After you have scanned your music collection you will find your tracks right here." ) ); - else - m_overlay->setText( tr( "This collection is currently empty." ) ); - - m_overlay->show(); - } - else - m_overlay->hide(); -} - - void TreeView::onFilterChangeFinished() { @@ -316,8 +298,17 @@ TreeView::onFilterChangeFinished() m_overlay->show(); } else + { if ( model()->trackCount() ) + { m_overlay->hide(); + } + else + { + m_overlay->setText( m_emptyTip ); + m_overlay->show(); + } + } } diff --git a/src/libtomahawk/playlist/TreeView.h b/src/libtomahawk/playlist/TreeView.h index 254403c81..8bd34cb03 100644 --- a/src/libtomahawk/playlist/TreeView.h +++ b/src/libtomahawk/playlist/TreeView.h @@ -97,7 +97,6 @@ protected slots: virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous ); private slots: - void onItemCountChanged( unsigned int items ); void onFilterChangeFinished(); void onFilteringStarted(); void onViewChanged();