Changeset 79bba04f in subsurface


Ignore:
Timestamp:
Jan 23, 2017, 10:11:51 PM (4 months ago)
Author:
Subsurface <dirk@…>
Branches:
master
Children:
c1dc0c9
Parents:
4cc4f5d
git-author:
Robert C. Helling <helling@…> (01/23/17 07:37:04)
git-committer:
Subsurface <dirk@…> (01/23/17 22:11:51)
Message:

Don't creat zero minute legs for gas switchen when replanning

Gas switches appear as special samples with zero or one second duration.
Those can be confusing when they appear as zero duration in the dive plan
when replanning, so better suppress theose.

Signed-off-by: Robert C. Helling <helling@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-models/diveplannermodel.cpp

    r913fa85 r79bba04f  
    7373        CylindersModel::instance()->updateDive();
    7474        duration_t lasttime = {};
     75        duration_t lastrecordedtime = {};
    7576        duration_t newtime = {};
    7677        free_dps(&diveplan);
     
    104105                if (samplecount) {
    105106                        int cylinderid = get_cylinderid_at_time(d, dc, lasttime);
    106                         addStop(depthsum / samplecount, newtime.seconds, cylinderid, 0, true);
     107                        if (newtime.seconds - lastrecordedtime.seconds > 10) {
     108                                addStop(depthsum / samplecount, newtime.seconds, cylinderid, 0, true);
     109                                lastrecordedtime = newtime;
     110                        }
    107111                        lasttime = newtime;
    108112                        depthsum = 0;
Note: See TracChangeset for help on using the changeset viewer.