mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 05:53:24 +00:00
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:
parent
1cf3b9a011
commit
9ad3e83c77
1 changed files with 1 additions and 2 deletions
|
@ -171,8 +171,7 @@ SetpointDialog *SetpointDialog::instance()
|
||||||
void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second)
|
void SetpointDialog::setpointData(struct divecomputer *divecomputer, int second)
|
||||||
{
|
{
|
||||||
dc = divecomputer;
|
dc = divecomputer;
|
||||||
time = second;
|
time = second < 0 ? 0 : second;
|
||||||
qDebug() << second << time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetpointDialog::buttonClicked(QAbstractButton *button)
|
void SetpointDialog::buttonClicked(QAbstractButton *button)
|
||||||
|
|
Loading…
Add table
Reference in a new issue