mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-25 02:09:48 +01:00
* OverlayWidget needs to update when items get removed, too.
This commit is contained in:
parent
3a47a5f9c8
commit
d713dec19d
@ -47,6 +47,7 @@ OverlayWidget::OverlayWidget( QAbstractItemView* parent )
|
||||
if ( m_parent->model() )
|
||||
{
|
||||
connect( m_parent->model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ), Qt::UniqueConnection );
|
||||
connect( m_parent->model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), SLOT( onViewChanged() ), Qt::UniqueConnection );
|
||||
}
|
||||
connect( m_parent, SIGNAL( modelChanged() ), SLOT( onViewModelChanged() ) );
|
||||
|
||||
@ -131,6 +132,7 @@ void
|
||||
OverlayWidget::onViewChanged()
|
||||
{
|
||||
PlayableProxyModel* model = qobject_cast<PlayableProxyModel*>( m_parent->model() );
|
||||
|
||||
if ( m_text.isEmpty() || ( model && ( model->rowCount( QModelIndex() ) || model->isLoading() ) ) )
|
||||
{
|
||||
hide();
|
||||
|
Loading…
x
Reference in New Issue
Block a user