diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 3a3eeaf81..2431b09bb 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -542,11 +542,11 @@ void PlannerDetails::setPlanNotes(QString plan) PlannerWidgets::PlannerWidgets() : planned_dive(alloc_dive()), + gasModel(std::make_unique()), + diveTypeModel(std::make_unique()), plannerWidget(*planned_dive, this), plannerSettingsWidget(this) { - gasModel = std::make_unique(); - diveTypeModel = std::make_unique(); connect(plannerDetails.printPlan(), &QPushButton::pressed, this, &PlannerWidgets::printDecoPlan); connect(DivePlannerPointsModel::instance(), &DivePlannerPointsModel::calculatedPlanNotes, &plannerDetails, &PlannerDetails::setPlanNotes); diff --git a/desktop-widgets/diveplanner.h b/desktop-widgets/diveplanner.h index d24e4c8c6..5fef8efcc 100644 --- a/desktop-widgets/diveplanner.h +++ b/desktop-widgets/diveplanner.h @@ -94,11 +94,11 @@ slots: public: void repopulateGasModel(); OwningDivePtr planned_dive; + std::unique_ptr gasModel; + std::unique_ptr diveTypeModel; DivePlannerWidget plannerWidget; PlannerSettingsWidget plannerSettingsWidget; PlannerDetails plannerDetails; - std::unique_ptr gasModel; - std::unique_ptr diveTypeModel; }; #endif // DIVEPLANNER_H