Commit 1e4bb1e0 authored by Ilkka Ollakka's avatar Ilkka Ollakka

qt4: playlist_model, set current to NULL if currentitem is removed or input changed to NULL

parent 3863e4e4
......@@ -282,6 +282,7 @@ bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action,
void PLModel::removeItem( int i_id )
{
PLItem *item = FindById( rootItem, i_id );
if( currentItem && currentItem->p_input == item->p_input ) currentItem = NULL;
if( item ) item->remove( item );
}
......@@ -663,6 +664,10 @@ void PLModel::ProcessInputItemUpdate( input_thread_t *p_input )
currentItem = item;
emit currentChanged( index( item, 0 ) );
}
else
{
currentItem = NULL;
}
}
void PLModel::ProcessInputItemUpdate( input_item_t *p_item )
{
......
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