mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
Try to accept drop as tracks first, then fallback to script resolvers.
This commit is contained in:
@@ -776,14 +776,6 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
|
|||||||
|
|
||||||
bool accept = false;
|
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 );
|
setDirtyRegion( m_dropRect );
|
||||||
@@ -843,6 +835,14 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
|
|||||||
event->setDropAction( Qt::CopyAction );
|
event->setDropAction( Qt::CopyAction );
|
||||||
event->accept();
|
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 );
|
setDirtyRegion( m_dropRect );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user