1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 16:14:40 +02:00

Disable drop-event hack in sidebar.

This commit is contained in:
Christian Muehlhaeuser
2015-04-12 04:49:39 +02:00
parent 808da0da62
commit 4e3b537f43

View File

@@ -875,16 +875,15 @@ SourceTreeView::dropEvent( QDropEvent* event )
const QModelIndex index = indexAt( pos ); const QModelIndex index = indexAt( pos );
// Need to fake the dropevent because the treeview would reject it if it is outside the item (on the tree) // Need to fake the dropevent because the treeview would reject it if it is outside the item (on the tree)
if ( pos.x() < 96 ) /* if ( pos.x() < 32 )
{ {
event->ignore(); QDropEvent* newEvent = new QDropEvent( pos + QPoint( 32, 0 ), event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers(), event->type() );
event->acceptProposedAction();
QDropEvent* newEvent = new QDropEvent( pos + QPoint( 96, 0 ), event->possibleActions(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers(), event->type() );
QTreeView::dropEvent( newEvent ); QTreeView::dropEvent( newEvent );
delete newEvent; delete newEvent;
return; return;
} }*/
// 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() ) ) if ( DropJob::isDropType( DropJob::Playlist, event->mimeData() ) )