summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-19 21:18:39 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-21 22:17:28 +0300
commitf47f2773fd4de5bfbb8d90e5e00dc18e0c18e5bb (patch)
tree2735961e5d272b79ce8ff81b8d6fd2197d00026b /profile-widget/profilewidget2.h
parent3c0c1801cd869f7a98c23356ab2ae4e373f55f31 (diff)
downloadsubsurface-f47f2773fd4de5bfbb8d90e5e00dc18e0c18e5bb.tar.gz
Dive pictures: don't repopulate DivePictureModel on deletion
On deletion of a single or multiple pictures, the whole DivePictureModel was repopulated, which was clearly visible in the UI, owing to the reconstructing of all images in the profile plot. To avoid this vexing behavior, implement proper deletion routines in DivePictureModel and ProfileWidget2. Since this needs sensible erase() semantics the QList<PictureEntry> member of DivePictureModel was replaced by a QVector. A QVector should be the default anyway, unless there are very specific reasons to use a QList (which actually is a deque, not a classical linked list). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.h')
-rw-r--r--profile-widget/profilewidget2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index 545c6475d..91774c9a9 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -110,6 +110,7 @@ slots: // Necessary to call from QAction's signals.
void replot(dive *d = 0);
#ifndef SUBSURFACE_MOBILE
void plotPictures();
+ void removePictures(const QModelIndex &, int first, int last);
void setPlanState();
void setAddState();
void changeGas();