1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

* Make sure all models emit a select request on first load.

This commit is contained in:
Christian Muehlhaeuser
2014-08-21 14:55:50 +02:00
parent 1ec521f1c6
commit b8a0d2ffab
4 changed files with 3 additions and 6 deletions

View File

@@ -711,11 +711,10 @@ PlayableModel::insertInternal( const QList< T >& items, int row, const QList< To
emit endInsertRows();
emit itemCountChanged( rowCount( QModelIndex() ) );
emit selectRequest( index( 0, 0, parent ) );
if ( parent.isValid() )
{
emit selectRequest( index( 0, 0, parent ) );
emit expandRequest( parent );
}
finishLoading();
}

View File

@@ -117,7 +117,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel )
}
m_model = sourceModel;
if ( m_model )
{
connect( m_model, SIGNAL( loadingStarted() ), SIGNAL( loadingStarted() ) );

View File

@@ -375,6 +375,7 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QModel
}
emit endInsertRows();
emit selectRequest( index( 0, 0, parent ) );
}

View File

@@ -27,8 +27,6 @@
#include "database/Database.h"
#include "playlist/TreeModel.h"
#include "playlist/PlayableModel.h"
#include "playlist/AlbumItemDelegate.h"
#include "playlist/GridItemDelegate.h"
#include "Source.h"
#include "MetaPlaylistInterface.h"
#include "playlist/TrackView.h"