1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Fix latching when switching directly between latches

This commit is contained in:
Leo Franchi
2011-10-13 22:33:32 -04:00
parent 3873189d79
commit ac7aadf615

View File

@@ -97,6 +97,17 @@ LatchManager::playlistChanged( PlaylistInterface* )
cmd->setTimestamp( QDateTime::currentDateTime().toTime_t() ); cmd->setTimestamp( QDateTime::currentDateTime().toTime_t() );
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) ); Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
if ( !m_waitingForLatch.isNull() &&
m_waitingForLatch != m_latchedOnTo )
{
// We are asked to latch on immediately to another source
m_latchedOnTo.clear();
m_latchedInterface.clear();
// call ourselves to hit the "create latch" condition
playlistChanged( 0 );
return;
}
m_latchedOnTo.clear(); m_latchedOnTo.clear();
m_waitingForLatch.clear(); m_waitingForLatch.clear();
m_latchedInterface.clear(); m_latchedInterface.clear();