mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +02:00
Add a new source item for temporary pages.
This fixes TWK-182. Also, ensure that what is selected on the left is always in sync with what is on the right. In addition, expand the parent nodes when selecting an item automatically in the tree.
This commit is contained in:
@@ -599,24 +599,12 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
|
||||
setHistoryPosition( m_pageHistory.count() - 1 );
|
||||
}
|
||||
|
||||
if ( !playlistForInterface( currentPlaylistInterface() ).isNull() )
|
||||
emit playlistActivated( playlistForInterface( currentPlaylistInterface() ) );
|
||||
|
||||
else if ( dynamicPlaylistForInterface( currentPlaylistInterface() ) )
|
||||
emit dynamicPlaylistActivated( dynamicPlaylistForInterface( currentPlaylistInterface() ) );
|
||||
else if ( collectionForInterface( currentPlaylistInterface() ) )
|
||||
emit collectionActivated( collectionForInterface( currentPlaylistInterface() ) );
|
||||
else if ( isSuperCollectionVisible() )
|
||||
emit superCollectionActivated();
|
||||
else if( isNewPlaylistPageVisible() )
|
||||
emit newPlaylistActivated();
|
||||
/* TODO refactor. now we have rows in the sourcetreeview that are connected to pages, e.g. Stations, Recently Updated, etc
|
||||
else if ( !currentPlaylistInterface() )
|
||||
emit tempPageActivated();*/
|
||||
|
||||
qDebug() << "View page shown:" << page->title();
|
||||
emit viewPageActivated( page );
|
||||
|
||||
if( page->isTemporaryPage() )
|
||||
emit tempPageActivated( page );
|
||||
|
||||
if ( !AudioEngine::instance()->playlist() )
|
||||
AudioEngine::instance()->setPlaylist( currentPlaylistInterface() );
|
||||
|
||||
|
Reference in New Issue
Block a user