diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 8c1783998..9df668002 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -997,14 +997,14 @@ void ProfileWidget2::mouseDoubleClickEvent(QMouseEvent *event) int minutes = lrint(timeAxis->valueAt(mappedPos) / 60); int milimeters = lrint(profileYAxis->valueAt(mappedPos) / M_OR_FT(1, 1)) * M_OR_FT(1, 1); - plannerModel->addStop(milimeters, minutes * 60, -1, 0, true, UNDEF_COMP_TYPE); + plannerModel->addStop(milimeters, minutes * 60); } } void ProfileWidget2::scrollViewTo(const QPoint &pos) { /* since we cannot use translate() directly on the scene we hack on - * the scroll bars (hidden) functionality */ + * the scroll bars (hidden) functionality */ if (!zoomLevel || currentState == EMPTY) return; QScrollBar *vs = verticalScrollBar(); diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 51e3a1101..56d22bd15 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -750,6 +750,11 @@ void DivePlannerPointsModel::addDefaultStop() addStop(0, 0, -1, 0, true, UNDEF_COMP_TYPE); } +void DivePlannerPointsModel::addStop(int milimeters, int seconds) +{ + addStop(milimeters, seconds, -1, 0, true, UNDEF_COMP_TYPE); +} + // cylinderid_in == -1 means same gas as before. // divemode == UNDEF_COMP_TYPE means determine from previous point. int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_in, int ccpoint, bool entered, enum divemode_t divemode) diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 17e1fb75e..0b13f7247 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -61,7 +61,7 @@ public: struct deco_state final_deco_state; void loadFromDive(dive *d); - int addStop(int millimeters, int seconds, int cylinderid_in, int ccpoint, bool entered, enum divemode_t); + void addStop(int millimeters, int seconds); public slots: void addDefaultStop(); @@ -117,6 +117,7 @@ signals: private: explicit DivePlannerPointsModel(QObject *parent = 0); void clear(); + int addStop(int millimeters, int seconds, int cylinderid_in, int ccpoint, bool entered, enum divemode_t); void setupStartTime(); void setupCylinders(); int lastEnteredPoint() const;