Changeset 53a8075 in subsurface


Ignore:
Timestamp:
May 26, 2017, 3:46:41 PM (7 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
e6d884c
Parents:
7b18be2a
git-author:
Robert C. Helling <helling@…> (05/17/17 13:22:50)
git-committer:
Dirk Hohndel <dirk@…> (05/26/17 15:46:41)
Message:

Fix right boundary when moving last handle in planner

There was a bug in the old code due to confusion between minutes
and seconds as the unit of the time axis. But rather than limiting
the time for the last handle in terms of the time axis (which
potentially includes long deco and allowing that for bottom time
quickly leads to dives many many hours long) limit it to 150%
of the previous bottom time.

Signed-off-by: Robert C. Helling <helling@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • profile-widget/profilewidget2.cpp

    r49d0bb8 r53a8075  
    18091809        DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
    18101810        int index = fixHandlerIndex(activeHandler);
    1811         int mintime = 0, maxtime = lrint((timeAxis->maximum() + 10) * 60);
     1811        int mintime = 0;
     1812        int maxtime = plannerModel->at(plannerModel->size() - 1).time * 3 / 2;
    18121813        if (index > 0)
    18131814                mintime = plannerModel->at(index - 1).time;
Note: See TracChangeset for help on using the changeset viewer.