mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Don't create stop at time zero when re-editing manually added dive
To our addStop method time = 0 & depth = 0 are a magic flag. And since we always start at the surface, that is assumed, anyway. So let's just not add a stop for that when re-creating a plan from a dive. Fixes #254 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c4a47a7d60
commit
3b9c28bce7
1 changed files with 2 additions and 0 deletions
|
@ -449,6 +449,8 @@ void DivePlannerPointsModel::loadFromDive(dive* d)
|
|||
int lasttime = 0;
|
||||
Q_FOREACH(const sample &s, backupSamples){
|
||||
int o2 = 0, he = 0;
|
||||
if (s.time.seconds == 0)
|
||||
continue;
|
||||
get_gas_from_events(&backupDive->dc, lasttime, &o2, &he);
|
||||
plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0);
|
||||
lasttime = s.time.seconds;
|
||||
|
|
Loading…
Reference in a new issue