When cleaning up the empty screen, also clean up dive sites

Otherwise we are using stale pointers in the displayed_dive_site global.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-02-14 11:56:33 -08:00
parent 92f514b081
commit cf07e3a79b

View file

@ -329,6 +329,7 @@ void MainWindow::cleanUpEmpty()
information()->updateDiveInfo(true);
graphics()->setEmptyState();
dive_list()->reload(DiveTripModel::TREE);
locationInformationWidget()->setLocationId(0);
globe()->reload();
if (!existing_filename)
setTitle(MWTF_DEFAULT);