diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-08 12:52:38 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-08 12:55:54 -0700 |
commit | c7e8042fbdd815677c146e4d21eed3b3481d21fd (patch) | |
tree | 2c1157bec639b53be49c3c86d4bc8ef49d31f2b8 /qt-ui/divelistview.cpp | |
parent | 15720837d3eaa10c28d4d4e33fa94e72fc417a9c (diff) | |
download | subsurface-c7e8042fbdd815677c146e4d21eed3b3481d21fd.tar.gz |
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>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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() |