mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Fixed resetting empty-tooltip in TreeView.
This commit is contained in:
parent
a3545712ca
commit
72c6b009ff
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user