mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Last gas used will be used on new dive planner point.
This patch makes the last gas used on the planner the default. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
167a55f6f5
commit
813722633d
1 changed files with 9 additions and 3 deletions
|
@ -1040,9 +1040,15 @@ int DivePlannerPointsModel::addStop(int meters, int minutes, const QString& gas,
|
||||||
divedatapoint point;
|
divedatapoint point;
|
||||||
point.depth = meters;
|
point.depth = meters;
|
||||||
point.time = minutes;
|
point.time = minutes;
|
||||||
point.o2 = 209;
|
if (row == 0){
|
||||||
point.he = 0;
|
point.o2 = 209;
|
||||||
point.po2 = 0;
|
point.he = 0;
|
||||||
|
point.po2 = 0;
|
||||||
|
}else{
|
||||||
|
divedatapoint before = at(row-1);
|
||||||
|
point.o2 = before.o2;
|
||||||
|
point.he = before.he;
|
||||||
|
}
|
||||||
divepoints.append( point );
|
divepoints.append( point );
|
||||||
std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan);
|
std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
Loading…
Add table
Reference in a new issue