From 9ad3e83c778bfe83a06f559f175c85b0043d8656 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Mon, 15 Dec 2014 23:33:16 +0100 Subject: Put manual set-point changes at negative time at start of dive Manually inserting set-point changes at negative times (left of the profile) caused the setpoint to end up at stupid values (probably some signed/unsigned confusion). This patch aligns them with the start of the dive. Fixes #774 Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qt-ui/simplewidgets.cpp') diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 192de3a80..47d2e4a07 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -171,8 +171,7 @@ SetpointDialog *SetpointDialog::instance() void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second) { dc = divecomputer; - time = second; - qDebug() << second << time; + time = second < 0 ? 0 : second; } void SetpointDialog::buttonClicked(QAbstractButton *button) -- cgit v1.2.3-70-g09d2