mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <sfuchs@gmx.de>
This commit is contained in:
parent
8ef87e618a
commit
a1e6ac2e09
3 changed files with 28 additions and 30 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue