profile: make plotdata::depth depth_t

A small drop in the bucket: more conversion to our unit types.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-12-14 17:09:05 +01:00 committed by Michael Keller
parent 851e8bc5ee
commit 94a54d8e35
9 changed files with 97 additions and 104 deletions

View file

@ -42,13 +42,13 @@ void RulerNodeItem2::recalculate()
if (x() < 0) {
setPos(0, y());
} else if (x() > timeAxis->posAtValue(last.sec)) {
setPos(timeAxis->posAtValue(last.sec), depthAxis->posAtValue(last.depth));
setPos(timeAxis->posAtValue(last.sec), depthAxis->posAtValue(last.depth.mm));
} else {
idx = 0;
while (idx < pInfo->nr && timeAxis->posAtValue(pInfo->entry[idx].sec) < x())
++idx;
const struct plot_data &data = pInfo->entry[idx];
setPos(timeAxis->posAtValue(data.sec), depthAxis->posAtValue(data.depth));
setPos(timeAxis->posAtValue(data.sec), depthAxis->posAtValue(data.depth.mm));
}
}