mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: set minimum/maximum of axes with a single call
This is bike-shedding: Instead of two setMinimum()/setMaximum() calls, use a single setBounds() call. A few axes (notably depth and time) always have a 0 as lower bound. However, this will change once there is a proper zooming functionality. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0bef8167d2
commit
89d9105209
4 changed files with 13 additions and 28 deletions
|
@ -970,7 +970,7 @@ void ProfileWidget2::divePlannerHandlerMoved()
|
|||
// Grow the time axis if necessary.
|
||||
int minutes = lrint(profileScene->timeAxis->valueAt(activeHandler->pos()) / 60);
|
||||
if (minutes * 60 > profileScene->timeAxis->maximum() * 0.9)
|
||||
profileScene->timeAxis->setMaximum(profileScene->timeAxis->maximum() * 1.02);
|
||||
profileScene->timeAxis->setBounds(0.0, profileScene->timeAxis->maximum() * 1.02);
|
||||
|
||||
divedatapoint data = plannerModel->at(index);
|
||||
data.depth.mm = lrint(profileScene->profileYAxis->valueAt(activeHandler->pos()) / M_OR_FT(1, 1)) * M_OR_FT(1, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue