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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-07-08 12:52:38 -07:00
parent 15720837d3
commit c7e8042fbd

View file

@ -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()