From 7295c8c6ece4c5f5f1b429dfe5627b4961ad5bb4 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 4 Aug 2014 14:06:58 -0300 Subject: Do not recreate all the dive just because a picture was added. If we add a picture to the dive, this will not change anything else, so there's no need to recalculate the profile_plot info. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 442ea1fb7..d58f31284 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -786,10 +786,8 @@ void DiveListView::loadImages() } mark_divelist_changed(true); - // the sequence is somewhat magic - replot re-populates the displayed_dive. - // calling refreshDisplay afterwards gets the picture model populated and the thumbnails displayed - MainWindow::instance()->graphics()->replot(); - MainWindow::instance()->refreshDisplay(); + copy_dive(current_dive, &displayed_dive); + DivePictureModel::instance()->updateDivePictures(); } QString DiveListView::lastUsedImageDir() -- cgit v1.2.3-70-g09d2