From c7e8042fbdd815677c146e4d21eed3b3481d21fd Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 8 Jul 2014 12:52:38 -0700 Subject: Picture handling: make sure pictures are shown after they were added We need to first replot() to get displayed_dive updated, then call refreshDisplay() so the picture model gets repopulated which triggers the pictures to show up. Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 4f5bfec26..621002ced 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -785,8 +785,10 @@ void DiveListView::loadImages() } mark_divelist_changed(true); - MainWindow::instance()->refreshDisplay(); + // 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(); } QString DiveListView::lastUsedImageDir() -- cgit v1.2.3-70-g09d2