Commit c80a170a authored by Ilkka Ollakka's avatar Ilkka Ollakka

Revert "Qt4: don't do playlist_model recursive remove as core signals for those anyway"

This reverts commit 926bbf14.
parent d45df2a1
...@@ -779,8 +779,10 @@ void PLModel::updateTreeItem( PLItem *item ) ...@@ -779,8 +779,10 @@ void PLModel::updateTreeItem( PLItem *item )
/************************* Actions ******************************/ /************************* Actions ******************************/
/** /**
* Lets not worry about nodes children, we do refersh anyway when * Deletion, here we have to do a ugly slow hack as we retrieve the full
* core tells that playlist has changed, should give some more speed * list of indexes to delete at once: when we delete a node and all of
* its children, we need to update the list.
* Todo: investigate whethere we can use ranges to be sure to delete all items?
*/ */
void PLModel::doDelete( QModelIndexList selected ) void PLModel::doDelete( QModelIndexList selected )
{ {
...@@ -794,6 +796,8 @@ void PLModel::doDelete( QModelIndexList selected ) ...@@ -794,6 +796,8 @@ void PLModel::doDelete( QModelIndexList selected )
if( index.column() != 0 ) continue; if( index.column() != 0 ) continue;
PLItem *item = getItem( index ); PLItem *item = getItem( index );
if( item->children.size() )
recurseDelete( item->children, &selected );
PL_LOCK; PL_LOCK;
playlist_DeleteFromInput( p_playlist, item->p_input, pl_Locked ); playlist_DeleteFromInput( p_playlist, item->p_input, pl_Locked );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment