From c71a5d74135d8ebf9dce6de6633499c1c41c07ff Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 1 May 2018 12:35:18 +0200 Subject: 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 --- profile-widget/profilewidget2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'profile-widget') 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); -- cgit v1.2.3-70-g09d2