diff options
author | 2021-02-12 11:36:24 +0100 | |
---|---|---|
committer | 2021-04-02 13:53:23 -0700 | |
commit | b4c307c775c6f1cd306094cb89ee53378b71c81e (patch) | |
tree | 86dd712cac9440b97caa6b0b6ef267e7aebd2827 /desktop-widgets/diveplanner.cpp | |
parent | 4d60662531b3c4ad1ce17c0fd2d7f9844cf52ece (diff) | |
download | subsurface-b4c307c775c6f1cd306094cb89ee53378b71c81e.tar.gz |
planner: set profile to planner state in main window
Remove mainwindow-access from the planner, by setting
the profile to planner state in the owner of the profile,
viz. the MainWindow.
The MainWindow sets the application state to planner, so
it seems legit that it also sets the profile state.
This removes a further interdependency.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r-- | desktop-widgets/diveplanner.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index e237097c5..527e0021a 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -540,8 +540,6 @@ PlannerWidgets::PlannerWidgets() void PlannerWidgets::planDive() { DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); - - MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0); dc_number = 0; // create a simple starting dive, using the first gas from the just copied cylinders @@ -569,8 +567,6 @@ void PlannerWidgets::replanDive() DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN); DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive); - MainWindow::instance()->graphics->setPlanState(&displayed_dive, 0); - plannerWidget.setReplanButton(true); plannerWidget.setupStartTime(timestampToDateTime(displayed_dive.when)); if (displayed_dive.surface_pressure.mbar) |