diff options
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 92a2c11a0..8126acf10 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1518,9 +1518,9 @@ void MainWindow::editCurrentDive() disableShortcuts(); copy_dive(current_dive, &displayed_dive); // Work on a copy of the dive DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD); + DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive); graphics->setAddState(&displayed_dive, 0); setApplicationState(ApplicationState::EditDive); - DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive); mainTab->enableEdition(); } diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index d0c58c8ab..8c1783998 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1300,6 +1300,9 @@ void ProfileWidget2::setAddState(const dive *d, int dc) diveCeiling->setVisible(true); decoModelParameters->setVisible(true); setBackgroundBrush(QColor("#A7DCFF")); + + pointsReset(); + repositionDiveHandlers(); } void ProfileWidget2::setPlanState(const dive *d, int dc) @@ -1328,6 +1331,9 @@ void ProfileWidget2::setPlanState(const dive *d, int dc) diveCeiling->setVisible(true); decoModelParameters->setVisible(true); setBackgroundBrush(QColor("#D7E3EF")); + + pointsReset(); + repositionDiveHandlers(); } #endif |