From a1e6ac2e0942a3950f76432e8dcf3c195c281052 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Wed, 29 Nov 2017 12:40:06 +0100 Subject: Dive picture handling: Re enable multi select, improve mouse events Some improvements for the dive picture tab and dive pictures in profile: - Bugfix mouse event in profile: Only Left-click will open picture - Bugfix mouse events in picture tab: - Re-enable context menu (Windows bug mainly) - Re-enable multi select in a nice way - Only double-left-click will open picture Signed-off-by: Stefan Fuchs --- profile-widget/divepixmapitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'profile-widget') 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 #include #include +#include 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() -- cgit v1.2.3-70-g09d2