mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Planner: Update plan when deco parameters change
This makes sure that the dive plan is updated (including the
planner notes) when parameters of the dive or the planner
change.
This fixes a bug reported by Jay Anchor.
There is a chance that by partly undoing 77a6bc6d62
, this
introduces too many recalculations of the plan. But without
this patch, there are definitely not enough recalculations.
Reported-by: Jay Anchor <jay.anchor-subsurface@e257.fi>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
dc645ce8c6
commit
5dfc183517
1 changed files with 3 additions and 0 deletions
|
@ -464,6 +464,7 @@ DivePlannerPointsModel *DivePlannerPointsModel::instance()
|
|||
|
||||
void DivePlannerPointsModel::emitDataChanged()
|
||||
{
|
||||
updateDiveProfile();
|
||||
emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1));
|
||||
}
|
||||
|
||||
|
@ -1062,6 +1063,8 @@ static bool shouldComputeVariations()
|
|||
|
||||
void DivePlannerPointsModel::updateDiveProfile()
|
||||
{
|
||||
if (!d)
|
||||
return;
|
||||
createTemporaryPlan();
|
||||
if (diveplan_empty(&diveplan))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue