mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
2209054226
commit
9d73b66024
1 changed files with 3 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include "profile-widget/animationfunctions.h"
|
#include "profile-widget/animationfunctions.h"
|
||||||
#include "qt-models/divepicturemodel.h"
|
#include "qt-models/divepicturemodel.h"
|
||||||
#include "core/pref.h"
|
#include "core/pref.h"
|
||||||
|
#include "core/qthelper.h"
|
||||||
#ifndef SUBSURFACE_MOBILE
|
#ifndef SUBSURFACE_MOBILE
|
||||||
#include "desktop-widgets/preferences/preferencesdialog.h"
|
#include "desktop-widgets/preferences/preferencesdialog.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,9 +107,8 @@ void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent*)
|
||||||
|
|
||||||
void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::LeftButton) {
|
if (event->button() == Qt::LeftButton)
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(fileUrl));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(localFilePath(fileUrl)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivePictureItem::removePicture()
|
void DivePictureItem::removePicture()
|
||||||
|
|
Loading…
Reference in a new issue