Commit 66612701 authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf

Avoid MoveEvent action in Drag&Drop

Close #2672
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 866b8474
......@@ -1095,6 +1095,10 @@ void MainInterface::dropEvent(QDropEvent *event)
void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
{
event->setDropAction( Qt::CopyAction );
if( !event->possibleActions() & Qt::CopyAction )
return;
const QMimeData *mimeData = event->mimeData();
/* D&D of a subtitles file, add it on the fly */
......@@ -1107,7 +1111,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
mimeData->urls()[0].toLocalFile() ) ),
true ) )
{
event->acceptProposedAction();
event->accept();
return;
}
}
......@@ -1125,7 +1129,7 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
RecentsMRL::getInstance( p_intf )->addRecent( s );
}
}
event->acceptProposedAction();
event->accept();
}
void MainInterface::dragEnterEvent(QDragEnterEvent *event)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment