mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
Work around nasty drag & drop issue.
This commit is contained in:
@@ -885,8 +885,13 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
QTreeView::dropEvent( event );
|
||||||
|
if ( event->isAccepted() )
|
||||||
|
{
|
||||||
|
tDebug() << Q_FUNC_INFO << "Ignoring accepted event!";
|
||||||
|
}
|
||||||
// if it's a playlist drop, accept it anywhere in the sourcetree by manually parsing it.
|
// if it's a playlist drop, accept it anywhere in the sourcetree by manually parsing it.
|
||||||
if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
else if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
||||||
{
|
{
|
||||||
DropJob* dropThis = new DropJob;
|
DropJob* dropThis = new DropJob;
|
||||||
dropThis->setDropTypes( DropJob::Playlist );
|
dropThis->setDropTypes( DropJob::Playlist );
|
||||||
@@ -895,12 +900,12 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
|
|
||||||
// Don't add it to the playlist under drop, it's a new playlist now
|
// Don't add it to the playlist under drop, it's a new playlist now
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
return;
|
event->accept();
|
||||||
}
|
}
|
||||||
|
else if ( model()->dropMimeData( event->mimeData(), event->proposedAction(), index.row(), 0, index.parent() ) )
|
||||||
if ( model()->dropMimeData( event->mimeData(), event->proposedAction(), index.row(), 0, index.parent() ) )
|
|
||||||
{
|
{
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
|
Reference in New Issue
Block a user