diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-05-01 12:35:18 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-13 13:52:35 -0700 |
commit | c71a5d74135d8ebf9dce6de6633499c1c41c07ff (patch) | |
tree | 2221f7e87767e80f2be0189cef82f8b03f9b511b /profile-widget/profilewidget2.cpp | |
parent | d33e3b22fc5d2e878ee6e03a25e99870484da217 (diff) | |
download | subsurface-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.cpp | 8 |
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); |