summaryrefslogtreecommitdiffstats
path: root/profile-widget/divepixmapitem.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-18 21:57:18 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-21 22:17:28 +0300
commit3c0c1801cd869f7a98c23356ab2ae4e373f55f31 (patch)
tree5166f64760eb0eef594e4a10af764c52b240d81d /profile-widget/divepixmapitem.cpp
parentfbe1144eaf7e800a014c7a97b846835ba9f3bc7f (diff)
downloadsubsurface-3c0c1801cd869f7a98c23356ab2ae4e373f55f31.tar.gz
Dive pictures: change removePicture() interface
The function removePicture() had a flag "last", which would indicate that the called had finished removing pictures. Only then would the model be recalculated. This is a strange interface and, matter of fact, the caller was buggy: if the last picture to be removed didn't have a proper url, removePicture() was never called with "last" being set. Change the interface to take a list of pictures to be deleted. This will allow us to make picture deletion smarter in follow-up commits. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/divepixmapitem.cpp')
-rw-r--r--profile-widget/divepixmapitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/divepixmapitem.cpp b/profile-widget/divepixmapitem.cpp
index c81cd51e1..27fea611b 100644
--- a/profile-widget/divepixmapitem.cpp
+++ b/profile-widget/divepixmapitem.cpp
@@ -116,6 +116,6 @@ void DivePictureItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
void DivePictureItem::removePicture()
{
#ifndef SUBSURFACE_MOBILE
- DivePictureModel::instance()->removePicture(fileUrl, true);
+ DivePictureModel::instance()->removePictures({ fileUrl });
#endif
}