summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/divepixmapitem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/profile-widget/divepixmapitem.cpp b/profile-widget/divepixmapitem.cpp
index 1c2f18b29..c1ce3b6dd 100644
--- a/profile-widget/divepixmapitem.cpp
+++ b/profile-widget/divepixmapitem.cpp
@@ -10,6 +10,7 @@
#include <QDesktopServices>
#include <QGraphicsView>
#include <QUrl>
+#include <QGraphicsSceneMouseEvent>
DivePixmapItem::DivePixmapItem(QObject *parent) : QObject(parent), QGraphicsPixmapItem()
{
@@ -129,8 +130,9 @@ DivePictureItem::~DivePictureItem(){
void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_UNUSED(event);
- QDesktopServices::openUrl(QUrl::fromLocalFile(fileUrl));
+ if (event->button() == Qt::LeftButton) {
+ QDesktopServices::openUrl(QUrl::fromLocalFile(fileUrl));
+ }
}
void DivePictureItem::removePicture()