Commit c06416a2 authored by Jakob Leben's avatar Jakob Leben Committed by Ilkka Ollakka
Browse files

Qt4: correct the check whether item is node



( PLModel::childrenCount() > 0 ) is not equivalent to (
playlist_item_t*->i_children > -1 ). This patch swaps former for latter
which is a correct strict check wether an item is node.
Signed-off-by: Ilkka Ollakka's avatarIlkka Ollakka <ileoo@videolan.org>
parent 9b4308cb
......@@ -158,10 +158,14 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
}
else
{
if ( (item->childCount() > 0) &&
PL_LOCK;
playlist_item_t *plItem =
playlist_ItemGetById( p_playlist, item->i_id );
if ( plItem && ( plItem->i_children > -1 ) &&
( rootItem->p_input == pl_input ||
rootItem->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled;
PL_UNLOCK;
flags |= Qt::ItemIsDragEnabled;
}
......
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