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>
This commit is contained in:
Robert C. Helling 2014-12-15 23:33:16 +01:00 committed by Dirk Hohndel
parent 1cf3b9a011
commit 9ad3e83c77

View file

@ -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)