mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-02 04:10:20 +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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
2
thirdparty/libportfwd/src/portfwd.cpp
vendored
2
thirdparty/libportfwd/src/portfwd.cpp
vendored
@@ -141,7 +141,7 @@ Portfwd::add( unsigned short port, unsigned short internal_port )
|
||||
sprintf(port_str, "%d", port);
|
||||
sprintf(port_str_internal, "%d", internal_port);
|
||||
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->CIF.servicetype,
|
||||
r = UPNP_AddPortMapping(urls->controlURL, data->first.servicetype,
|
||||
port_str, port_str_internal, m_lanip.c_str(), "tomahawk", "TCP", NULL);
|
||||
if(r!=0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user