diff options
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/divepixmapitem.cpp | 7 | ||||
-rw-r--r-- | qt-ui/profile/divepixmapitem.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp index 853b95029..a73473a1f 100644 --- a/qt-ui/profile/divepixmapitem.cpp +++ b/qt-ui/profile/divepixmapitem.cpp @@ -114,6 +114,11 @@ void DivePictureItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) button->hide(); } +DivePictureItem::~DivePictureItem(){ + if(button) + Animations::hide(button); +} + void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { QDesktopServices::openUrl(QUrl::fromLocalFile(fileUrl)); @@ -121,7 +126,5 @@ void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event) void DivePictureItem::removePicture() { - Animations::hide(button); - hide(); DivePictureModel::instance()->removePicture(fileUrl); } diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h index d39f26db6..963e641e8 100644 --- a/qt-ui/profile/divepixmapitem.h +++ b/qt-ui/profile/divepixmapitem.h @@ -19,6 +19,7 @@ class DivePictureItem : public DivePixmapItem { Q_PROPERTY(qreal scale WRITE setScale READ scale) public: DivePictureItem(QObject *parent = 0); + virtual ~DivePictureItem(); void setPixmap(const QPixmap& pix); public slots: void settingsChanged(); |