diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index f545fecd0..1e1df3a4d 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -568,6 +568,7 @@ divemode_t PlannerWidgets::getRebreatherMode() const void PlannerWidgets::preparePlanDive(const dive *currentDive) { + DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); // create a simple starting dive, using the first gas from the just copied cylinders DivePlannerPointsModel::instance()->createSimpleDive(planned_dive.get()); diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 19f3e46f2..9c03f2e5b 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -581,7 +581,7 @@ void MainWindow::enableShortcuts() void MainWindow::showProfile() { enableShortcuts(); - profile->plotCurrentDive(); + profile->plotDive(current_dive, profile->dc); setApplicationState(ApplicationState::Default); } diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index d362c462d..22ac062ca 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -393,6 +393,7 @@ static void hideAll(const T &container) void ProfileWidget2::clear() { + currentState = INIT; #ifndef SUBSURFACE_MOBILE clearPictures(); #endif