mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-30 19:00:12 +02:00
TWK-216: reset the proper view mode toggle when changing to a different view mode automatically
This commit is contained in:
@@ -971,6 +971,19 @@ ViewManager::showCurrentTrack()
|
||||
{
|
||||
setPage( page );
|
||||
page->jumpToCurrentTrack();
|
||||
|
||||
// reset the correct mode, if the user has changed it since
|
||||
|
||||
if ( dynamic_cast< CollectionView* >( page ) )
|
||||
m_currentMode = PlaylistInterface::Flat;
|
||||
else if ( dynamic_cast< AlbumView* >( page ) )
|
||||
m_currentMode = PlaylistInterface::Album;
|
||||
else if ( dynamic_cast< ArtistView* >( page ) )
|
||||
m_currentMode = PlaylistInterface::Tree;
|
||||
else
|
||||
return;
|
||||
|
||||
emit modeChanged( (PlaylistInterface::ViewMode)m_currentMode );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user