aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets/DDListWidgets.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-09-08 12:53:44 -0400
committerKen Moore <moorekou@gmail.com>2015-09-08 12:53:44 -0400
commit0c0f8e1ef834c63aacd9054e1e89172551c20c46 (patch)
tree1ba67cb3f2a939dd3c34bbacd32e0f597c98469e /lumina-fm/widgets/DDListWidgets.h
parentQuick fix to the libLumina project file to ensure all the colors/themes get i... (diff)
downloadlumina-0c0f8e1ef834c63aacd9054e1e89172551c20c46.tar.gz
lumina-0c0f8e1ef834c63aacd9054e1e89172551c20c46.tar.bz2
lumina-0c0f8e1ef834c63aacd9054e1e89172551c20c46.zip
Fix up the "back" functionality for mouse4 clicks.
Diffstat (limited to 'lumina-fm/widgets/DDListWidgets.h')
-rw-r--r--lumina-fm/widgets/DDListWidgets.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/lumina-fm/widgets/DDListWidgets.h b/lumina-fm/widgets/DDListWidgets.h
index c211206b..d47c7ee4 100644
--- a/lumina-fm/widgets/DDListWidgets.h
+++ b/lumina-fm/widgets/DDListWidgets.h
@@ -20,6 +20,7 @@
#include <QDrag>
#include <QFileInfo>
#include <QDebug>
+#include <QMouseEvent>
//==============
// LIST WIDGET
@@ -84,11 +85,14 @@ protected:
ev->setDropAction(Qt::CopyAction);
}
ev->accept(); //allow this to be dropped here
- }
+ }else{
+ ev->ignore();
+ }
}
void dropEvent(QDropEvent *ev){
- if(this->whatsThis().isEmpty()){ return; } //not supported
+ if(this->whatsThis().isEmpty()){ ev->ignore(); return; } //not supported
+ //qDebug() << "Drop Event:";
ev->accept(); //handled here
QString dirpath = this->whatsThis();
//See if the item under the drop point is a directory or not
@@ -102,6 +106,11 @@ protected:
//qDebug() << "Drop Event:" << dirpath;
emit DataDropped( dirpath, QString(ev->mimeData()->data(MIME)).split("\n") );
}
+
+ void mouseReleaseEvent(QMouseEvent *ev){
+ if(ev->button() != Qt::RightButton && ev->button() != Qt::LeftButton){ ev->ignore(); }
+ else{ QListWidget::mouseReleaseEvent(ev); } //pass it along to the widget
+ }
};
//================
@@ -185,5 +194,10 @@ protected:
//qDebug() << "Drop Event:" << dirpath;
emit DataDropped( dirpath, QString(ev->mimeData()->data(MIME)).split("\n") );
}
+
+ void mouseReleaseEvent(QMouseEvent *ev){
+ if(ev->button() != Qt::RightButton && ev->button() != Qt::LeftButton){ ev->ignore(); }
+ else{ QTreeWidget::mouseReleaseEvent(ev); } //pass it along to the widget
+ }
};
#endif \ No newline at end of file
bgstack15