1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

CLean up some logic

This commit is contained in:
Leo Franchi
2011-09-20 11:26:17 -04:00
parent 337be1f989
commit 27c2bc1b2d

View File

@@ -372,6 +372,10 @@ SourceTreeView::latchOn()
void
SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
{
// If we were latched on and changed, send the listening along stop
if ( m_latch.isNull() )
return;
const PlaylistInterface* pi = AudioEngine::instance()->playlist();
bool listeningAlong = false;
source_ptr newSource;
@@ -386,9 +390,6 @@ SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
}
}
// If we were latched on and changed, send the listening along stop
if ( !m_latch.isNull() )
{
SourcePlaylistInterface* origsourcepi = dynamic_cast< SourcePlaylistInterface* >( m_latch.data() );
Q_ASSERT( origsourcepi );
const source_ptr source = origsourcepi->source();
@@ -405,7 +406,6 @@ SourceTreeView::playlistChanged( PlaylistInterface* newInterface )
Database::instance()->enqueue( QSharedPointer< DatabaseCommand >( cmd ) );
m_latch.clear();
}
}
void