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

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: default avatarIlkka Ollakka <ileoo@videolan.org>
parent 9b4308cb
...@@ -158,10 +158,14 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const ...@@ -158,10 +158,14 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
} }
else 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 == pl_input ||
rootItem->p_input == ml_input ) ) rootItem->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled; flags |= Qt::ItemIsDropEnabled;
PL_UNLOCK;
flags |= Qt::ItemIsDragEnabled; 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