diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-06-03 17:51:59 +0200 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2018-06-04 07:44:32 +0200 |
commit | 9d73b6602483fc0b8609adc041d824ec5e43ee62 (patch) | |
tree | 50a04a5751ca5304a982934820255393f60a7203 /profile-widget/divepixmapitem.cpp | |
parent | 2209054226f463a3fd0b88a34e9dcd18e15b363b (diff) | |
download | subsurface-9d73b6602483fc0b8609adc041d824ec5e43ee62.tar.gz |
Profile: open pictures using local file path
Make the behavior of the profile-pictures consistent with the pictures
in the photos-tab: Use the local file path to open the picture in the
system viewer instead of the canonical filename (which might point to
a non-existing location).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/divepixmapitem.cpp')
-rw-r--r-- | profile-widget/divepixmapitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/profile-widget/divepixmapitem.cpp b/profile-widget/divepixmapitem.cpp index 58d6f2776..959e8d2c4 100644 --- a/profile-widget/divepixmapitem.cpp +++ b/profile-widget/divepixmapitem.cpp @@ -3,6 +3,7 @@ #include "profile-widget/animationfunctions.h" #include "qt-models/divepicturemodel.h" #include "core/pref.h" +#include "core/qthelper.h" #ifndef SUBSURFACE_MOBILE #include "desktop-widgets/preferences/preferencesdialog.h" #endif @@ -106,9 +107,8 @@ void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent*) void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { - if (event->button() == Qt::LeftButton) { - QDesktopServices::openUrl(QUrl::fromLocalFile(fileUrl)); - } + if (event->button() == Qt::LeftButton) + QDesktopServices::openUrl(QUrl::fromLocalFile(localFilePath(fileUrl))); } void DivePictureItem::removePicture() |