aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets/DDListWidgets.h
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm/widgets/DDListWidgets.h')
-rw-r--r--lumina-fm/widgets/DDListWidgets.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lumina-fm/widgets/DDListWidgets.h b/lumina-fm/widgets/DDListWidgets.h
index c2601335..2c51e8cc 100644
--- a/lumina-fm/widgets/DDListWidgets.h
+++ b/lumina-fm/widgets/DDListWidgets.h
@@ -81,7 +81,11 @@ protected:
void dragMoveEvent(QDragMoveEvent *ev){
if(ev->mimeData()->hasUrls() && !this->whatsThis().isEmpty() ){
- ev->acceptProposedAction(); //allow this to be dropped here
+ //Change the drop type depending on the data/dir
+ QString home = QDir::homePath();
+ if( this->whatsThis().startsWith(home) ){ ev->setDropAction(Qt::MoveAction); }
+ else{ ev->setDropAction(Qt::CopyAction); }
+ ev->accept(); //allow this to be dropped here
}else{
ev->ignore();
}
@@ -184,7 +188,11 @@ protected:
void dragMoveEvent(QDragMoveEvent *ev){
if(ev->mimeData()->hasUrls() && !this->whatsThis().isEmpty() ){
- ev->acceptProposedAction(); //allow this to be dropped here
+ //Change the drop type depending on the data/dir
+ QString home = QDir::homePath();
+ if( this->whatsThis().startsWith(home) ){ ev->setDropAction(Qt::MoveAction); }
+ else{ ev->setDropAction(Qt::CopyAction); }
+ ev->accept(); //allow this to be dropped here
}else{
ev->ignore();
}
bgstack15