From a70eccea29ae322af228e699e4008132476ceff2 Mon Sep 17 00:00:00 2001 From: Jason Bramwell Date: Thu, 3 Mar 2022 12:35:29 +0000 Subject: [PATCH] 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

Max / mean depth

{{ dive.depth }} / {{ dive.meandepth }}

Reported-by: Rahul Swaminathan Signed-off-by: Jason Bramwell Signed-off-by: Dirk Hohndel --- desktop-widgets/templatelayout.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 56865f7a8..2578b6bdf 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -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") {