summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-08-04 14:06:58 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-04 10:38:00 -0700
commit7295c8c6ece4c5f5f1b429dfe5627b4961ad5bb4 (patch)
treed243495bac3b33771114ad226f498d72042a7fe2 /qt-ui
parent0130f8411b6e6de692d8c10f96aefc1796dc00f4 (diff)
downloadsubsurface-7295c8c6ece4c5f5f1b429dfe5627b4961ad5bb4.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp6
1 files 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()