From 1508f957752aaecf3e416966aec2c6bab8737261 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sat, 2 Aug 2014 22:05:52 +0200 Subject: Update pictures when entering/exiting planner This fixes the problem I pointed out im my comment to #667 and hopefully also the original problem although I cannot confirm since i cannot reproduce the problem in the first place. See #677 Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 1 + qt-ui/mainwindow.cpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 0ed6c5dbf..5a6f7b537 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -838,6 +838,7 @@ void MainTab::rejectChanges() else clear_dive(&displayed_dive); updateDiveInfo(selected_dive < 0); + DivePictureModel::instance()->updateDivePictures(); // the user could have edited the location and then canceled the edit // let's get the correct location back in view MainWindow::instance()->globe()->centerOnCurrentDive(); diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index fece00848..aa9d8c145 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -394,6 +394,7 @@ void MainWindow::planCanceled() showProfile(); refreshDisplay(false); ui.newProfile->plotDive(get_dive(selected_dive)); + DivePictureModel::instance()->updateDivePictures(); } void MainWindow::planCreated() @@ -453,6 +454,7 @@ void MainWindow::on_actionDivePlanner_triggered() setupForAddAndPlan("planned dive"); // don't translate, stored in XML file DivePlannerPointsModel::instance()->setupStartTime(); DivePlannerPointsModel::instance()->createSimpleDive(); + DivePictureModel::instance()->updateDivePictures(); ui.diveListPane->setCurrentIndex(1); // switch to the plan output ui.globePane->setCurrentIndex(1); -- cgit v1.2.3-70-g09d2