summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 828f9eed3..4efd53fed 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1808,7 +1808,8 @@ void ProfileWidget2::recreatePlannedDive()
DiveHandler *activeHandler = qobject_cast<DiveHandler *>(sender());
DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
int index = fixHandlerIndex(activeHandler);
- int mintime = 0, maxtime = lrint((timeAxis->maximum() + 10) * 60);
+ int mintime = 0;
+ int maxtime = plannerModel->at(plannerModel->size() - 1).time * 3 / 2;
if (index > 0)
mintime = plannerModel->at(index - 1).time;
if (index < plannerModel->size() - 1)