1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

* Restore the empty-tooltip when filtering is done.

This commit is contained in:
Christian Muehlhaeuser 2012-06-01 07:48:50 +02:00
parent 1da5ea8ae7
commit 5ee92afb36
2 changed files with 11 additions and 1 deletions

View File

@ -176,6 +176,7 @@ TrackView::setPlayableModel( PlayableModel* model )
void
TrackView::setEmptyTip( const QString& tip )
{
m_emptyTip = tip;
m_overlay->setText( tip );
}
@ -508,8 +509,17 @@ TrackView::onFilterChanged( const QString& )
m_overlay->show();
}
else
{
if ( model()->trackCount() )
{
m_overlay->hide();
}
else
{
m_overlay->setText( m_emptyTip );
m_overlay->show();
}
}
}

View File

@ -137,6 +137,7 @@ private:
OverlayWidget* m_overlay;
AnimatedSpinner* m_loadingSpinner;
QString m_emptyTip;
bool m_resizing;
bool m_dragging;
QRect m_dropRect;
@ -147,7 +148,6 @@ private:
QModelIndex m_contextMenuIndex;
Tomahawk::query_ptr m_autoPlaying;
Tomahawk::ContextMenu* m_contextMenu;
QTimer m_timer;