mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Delete pictures from the Widget by pressing delete
Select the picture, press delete, profit. [Dirk Hohndel: removed the stray hunk that snuck into this patch] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b0addb4567
commit
68af9f0afb
4 changed files with 24 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue