summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-05-01 12:35:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commitc71a5d74135d8ebf9dce6de6633499c1c41c07ff (patch)
tree2221f7e87767e80f2be0189cef82f8b03f9b511b /profile-widget/profilewidget2.cpp
parentd33e3b22fc5d2e878ee6e03a25e99870484da217 (diff)
downloadsubsurface-c71a5d74135d8ebf9dce6de6633499c1c41c07ff.tar.gz
Dive pictures: Don't update all pictures on drag & drop to profile
In the old code, we used to reload the whole picture list on drag & drop to the profile. Instead, only update the drag&dropped picture and repaint the profile-pictures. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 1e7e64daf..c033e2c34 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -2060,14 +2060,14 @@ void ProfileWidget2::dropEvent(QDropEvent *event)
if (QString(picture->filename) == filename) {
picture->offset.seconds = lrint(timeAxis->valueAt(mappedPos));
mark_divelist_changed(true);
+#ifndef SUBSURFACE_MOBILE
+ DivePictureModel::instance()->updateDivePictureOffset(filename, picture->offset.seconds);
+ plotPictures();
+#endif
break;
}
}
copy_dive(current_dive, &displayed_dive);
-#ifndef SUBSURFACE_MOBILE
- DivePictureModel::instance()->updateDivePictures();
-#endif
-
if (event->source() == this) {
event->setDropAction(Qt::MoveAction);