Commit 0ce4275a authored by Jakob Leben's avatar Jakob Leben Committed by Rémi Denis-Courmont

Qt4 Playlist: Disable moving items into top level of Playlist/Library Selector Panel

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent ba6a16dc
......@@ -118,8 +118,10 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index );
if( index.isValid() )
return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
else
return Qt::ItemIsDropEnabled | defaultFlags;
else if ( rootItem->i_id != p_playlist->p_root_onelevel->i_id
&& rootItem->i_id != p_playlist->p_root_category->i_id )
defaultFlags |= Qt::ItemIsDropEnabled;
return defaultFlags;
}
/* A list of model indexes are a playlist */
......
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