1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

Try to accept drop as tracks first, then fallback to script resolvers.

This commit is contained in:
Christian Muehlhaeuser
2014-11-15 15:48:15 +01:00
parent 69f64c041c
commit 34eb23842f

View File

@@ -776,15 +776,7 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
bool accept = false;
// Don't highlight the drop for a playlist, as it won't get added to the playlist but created generally
if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
{
event->setDropAction( Qt::CopyAction );
event->accept();
return;
}
if ( DropJob::acceptsMimeData( event->mimeData(), DropJob::Track, DropJob::Append ) )
if ( DropJob::acceptsMimeData( event->mimeData(), DropJob::Track, DropJob::Append ) )
{
setDirtyRegion( m_dropRect );
const QPoint pos = event->pos();
@@ -843,6 +835,14 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
event->setDropAction( Qt::CopyAction );
event->accept();
}
else if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
{
// Don't highlight the drop for a playlist, as it won't get added to the playlist but created generally
event->setDropAction( Qt::CopyAction );
event->accept();
return;
}
setDirtyRegion( m_dropRect );
}