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:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user