printing: make meandepth available to print templates

Adding additional exported value meandepth to be available in the print
template language.

A possible use of this would be

<td class="fieldTitle">
    <h1> Max / mean depth </h1>
</td>
<td class="fieldData">
    <p> {{ dive.depth }} / {{ dive.meandepth }} </p>
</td>

Reported-by: Rahul Swaminathan <rahul.swaminathan@gmail.com>
Signed-off-by: Jason Bramwell <jb2cool@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Jason Bramwell 2022-03-03 12:35:29 +00:00 committed by Dirk Hohndel
parent 12e61e8c12
commit a70eccea29

View file

@ -541,6 +541,8 @@ QVariant TemplateLayout::getValue(QString list, QString property, const State &s
return d->duration.seconds == 0 && d->dc.duration.seconds == 0;
} else if (property == "depth") {
return get_depth_string(d->dc.maxdepth.mm, true, true);
} else if (property == "meandepth") {
return get_depth_string(d->dc.meandepth.mm, true, true);
} else if (property == "divemaster") {
return d->diveguide;
} else if (property == "diveguide") {