Commit f01abf1d authored by Rémi Duraffort's avatar Rémi Duraffort

Don't move an item to the middle of nowhere.

parent 201b767a
...@@ -149,11 +149,11 @@ bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action, ...@@ -149,11 +149,11 @@ bool PLModel::dropMimeData( const QMimeData *data, Qt::DropAction action,
if( action == Qt::IgnoreAction ) if( action == Qt::IgnoreAction )
return true; return true;
PLItem *targetItem; if( !target.isValid() )
if( target.isValid() ) /* We don't want to move on an invalid position */
targetItem = static_cast<PLItem*>( target.internalPointer() ); return true;
else
targetItem = rootItem; PLItem *targetItem = static_cast<PLItem*>( target.internalPointer() );
QByteArray encodedData = data->data( "vlc/playlist-item-id" ); QByteArray encodedData = data->data( "vlc/playlist-item-id" );
QDataStream stream( &encodedData, QIODevice::ReadOnly ); QDataStream stream( &encodedData, QIODevice::ReadOnly );
......
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