1
0
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:
Leo Franchi
2011-08-14 17:44:43 -04:00
parent 7d2c284a3e
commit ae32b0b368
2 changed files with 17 additions and 4 deletions

View File

@@ -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 );
}
}