mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 15:16:34 +02:00
* Fixed TWK-279 - Play first track of a playlist if play is clicked and nothing is playing yet.
This commit is contained in:
@@ -410,6 +410,7 @@ ViewManager::showSuperCollection()
|
||||
return shown;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ViewManager::playlistInterfaceChanged( Tomahawk::PlaylistInterface* interface )
|
||||
{
|
||||
@@ -570,7 +571,6 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
|
||||
|
||||
// save the old playlist shuffle state in config before we change playlists
|
||||
saveCurrentPlaylistSettings();
|
||||
|
||||
unlinkPlaylist();
|
||||
|
||||
if ( !m_pageHistory.contains( page ) )
|
||||
@@ -592,11 +592,11 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
|
||||
qDebug() << "View page shown:" << page->title();
|
||||
emit viewPageActivated( page );
|
||||
|
||||
if( page->isTemporaryPage() )
|
||||
if ( page->isTemporaryPage() )
|
||||
emit tempPageActivated( page );
|
||||
|
||||
if ( !AudioEngine::instance()->playlist() )
|
||||
AudioEngine::instance()->setPlaylist( currentPlaylistInterface() );
|
||||
if ( AudioEngine::instance()->state() == AudioEngine::Stopped )
|
||||
AudioEngine::instance()->setPlaylist( page->playlistInterface() );
|
||||
|
||||
// UGH!
|
||||
if ( QObject* obj = dynamic_cast< QObject* >( currentPage() ) )
|
||||
@@ -649,6 +649,7 @@ ViewManager::unlinkPlaylist()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ViewManager::saveCurrentPlaylistSettings()
|
||||
{
|
||||
@@ -725,6 +726,7 @@ ViewManager::updateView()
|
||||
loadCurrentPlaylistSettings();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ViewManager::loadCurrentPlaylistSettings()
|
||||
{
|
||||
@@ -741,6 +743,7 @@ ViewManager::loadCurrentPlaylistSettings()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ViewManager::onWidgetDestroyed( QWidget* widget )
|
||||
{
|
||||
@@ -815,18 +818,21 @@ ViewManager::createDynamicPlaylist( const Tomahawk::source_ptr& src,
|
||||
p->reportCreated( p );
|
||||
}
|
||||
|
||||
|
||||
ViewPage*
|
||||
ViewManager::pageForCollection( const collection_ptr& col ) const
|
||||
{
|
||||
return m_collectionViews.value( col, 0 );
|
||||
}
|
||||
|
||||
|
||||
ViewPage*
|
||||
ViewManager::pageForDynPlaylist(const dynplaylist_ptr& pl) const
|
||||
{
|
||||
return m_dynamicWidgets.value( pl, 0 );
|
||||
}
|
||||
|
||||
|
||||
ViewPage*
|
||||
ViewManager::pageForPlaylist(const playlist_ptr& pl) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user