diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-12-15 23:33:16 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-16 07:07:49 -0800 |
commit | 9ad3e83c778bfe83a06f559f175c85b0043d8656 (patch) | |
tree | 09a81c38a9f40a91647f4a76fdec176c6bfc71ea /qt-ui/simplewidgets.cpp | |
parent | 1cf3b9a01136034eea91f64f79636b0ea1601bac (diff) | |
download | subsurface-9ad3e83c778bfe83a06f559f175c85b0043d8656.tar.gz |
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 <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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) |