mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Revert order for drop types.
This commit is contained in:
@@ -774,10 +774,15 @@ SourceTreeView::dragMoveEvent( QDragMoveEvent* event )
|
|||||||
{
|
{
|
||||||
QTreeView::dragMoveEvent( event );
|
QTreeView::dragMoveEvent( event );
|
||||||
|
|
||||||
bool accept = false;
|
if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
||||||
|
|
||||||
if ( DropJob::acceptsMimeData( event->mimeData(), DropJob::Track, DropJob::Append ) )
|
|
||||||
{
|
{
|
||||||
|
// 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();
|
||||||
|
}
|
||||||
|
else if ( DropJob::acceptsMimeData( event->mimeData(), DropJob::Track, DropJob::Append ) )
|
||||||
|
{
|
||||||
|
bool accept = false;
|
||||||
setDirtyRegion( m_dropRect );
|
setDirtyRegion( m_dropRect );
|
||||||
const QPoint pos = event->pos();
|
const QPoint pos = event->pos();
|
||||||
const QModelIndex index = indexAt( pos );
|
const QModelIndex index = indexAt( pos );
|
||||||
@@ -835,13 +840,6 @@ 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