aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-27 19:42:42 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-04-02 13:53:23 -0700
commit337d9318ad37e2917672897f2625f78ebe049657 (patch)
treed0f3c84d0b023b4265d842981f7c824362ec5c60 /profile-widget
parent71e117669d835c477c9a4eec4b4d84f91962f8f7 (diff)
downloadsubsurface-337d9318ad37e2917672897f2625f78ebe049657.tar.gz
planner: split addStop() into external and internal versions
The DivePlannerPointsModel::addStop() function is called by the profile to add a planner-stop. It is also used internally to create profiles. If we ever want to include this in the undo system, we have to split these into to versions. One will ultimately place an undo command and update the profile, the other one doesn't. For now, this makes the external interface simpler, as some parameters are redundant. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp4
1 files changed, 2 insertions, 2 deletions
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();