mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 23:57:34 +02:00
Only remove playlists from saved list if that playlist was deleted and is still in our internal db
This commit is contained in:
@@ -746,12 +746,14 @@ ViewManager::onWidgetDestroyed( QWidget* widget )
|
|||||||
for ( int i = 0; i < m_pageHistory.count(); i++ )
|
for ( int i = 0; i < m_pageHistory.count(); i++ )
|
||||||
{
|
{
|
||||||
ViewPage* page = m_pageHistory.at( i );
|
ViewPage* page = m_pageHistory.at( i );
|
||||||
|
if ( page->widget() != widget )
|
||||||
|
continue;
|
||||||
|
|
||||||
if ( playlistForInterface( page->playlistInterface() ).isNull() )
|
if ( !playlistForInterface( page->playlistInterface() ).isNull() )
|
||||||
{
|
{
|
||||||
m_playlistViews.remove( playlistForInterface( page->playlistInterface() ) );
|
m_playlistViews.remove( playlistForInterface( page->playlistInterface() ) );
|
||||||
}
|
}
|
||||||
if ( dynamicPlaylistForInterface( page->playlistInterface() ).isNull() )
|
if ( !dynamicPlaylistForInterface( page->playlistInterface() ).isNull() )
|
||||||
{
|
{
|
||||||
m_dynamicWidgets.remove( dynamicPlaylistForInterface( page->playlistInterface() ) );
|
m_dynamicWidgets.remove( dynamicPlaylistForInterface( page->playlistInterface() ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user