profile: don't check for stepping past maximum time / depth

When moving a planner point with the cursor, nothing
is wrong with extending the dive time by stepping
beyond the current maximum. Same for depth.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-26 20:40:22 +01:00 committed by Dirk Hohndel
parent 752724aa1e
commit 36f0ba9abe

View file

@ -1829,8 +1829,6 @@ void ProfileWidget2::keyDownAction()
if (DiveHandler *handler = qgraphicsitem_cast<DiveHandler *>(i)) {
int row = handleIndex(handler);
divedatapoint dp = plannerModel->at(row);
if (dp.depth.mm >= profileYAxis->maximum())
continue;
dp.depth.mm += M_OR_FT(1, 5);
plannerModel->editStop(row, dp);
@ -1894,8 +1892,6 @@ void ProfileWidget2::keyRightAction()
if (DiveHandler *handler = qgraphicsitem_cast<DiveHandler *>(i)) {
int row = handleIndex(handler);
divedatapoint dp = plannerModel->at(row);
if (dp.time / 60.0 >= timeAxis->maximum())
continue;
dp.time += 60;
plannerModel->editStop(row, dp);