mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
851e8bc5ee
commit
94a54d8e35
9 changed files with 97 additions and 104 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue