mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
Be less verbose in SourceTreeView.
This commit is contained in:
@@ -892,26 +892,25 @@ SourceTreeView::dropEvent( QDropEvent* event )
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
QTreeView::dropEvent( event );
|
QTreeView::dropEvent( event );
|
||||||
if ( event->isAccepted() )
|
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 ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
||||||
// if it's a playlist drop, accept it anywhere in the sourcetree by manually parsing it.
|
{
|
||||||
else if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )
|
DropJob* dropThis = new DropJob;
|
||||||
{
|
dropThis->setDropTypes( DropJob::Playlist );
|
||||||
DropJob* dropThis = new DropJob;
|
dropThis->setDropAction( DropJob::Create );
|
||||||
dropThis->setDropTypes( DropJob::Playlist );
|
dropThis->parseMimeData( event->mimeData() );
|
||||||
dropThis->setDropAction( DropJob::Create );
|
|
||||||
dropThis->parseMimeData( event->mimeData() );
|
|
||||||
|
|
||||||
// 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();
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
else if ( model()->dropMimeData( event->mimeData(), event->proposedAction(), index.row(), 0, index.parent() ) )
|
else if ( model()->dropMimeData( event->mimeData(), event->proposedAction(), index.row(), 0, index.parent() ) )
|
||||||
{
|
{
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
event->accept();
|
event->accept();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
|
Reference in New Issue
Block a user