diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-27 22:06:05 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-04-02 13:53:23 -0700 |
commit | 77a6bc6d623148632d247048b254e8b8b40c9ab1 (patch) | |
tree | f8b8daee71f4dfeb0e2976459283db5ff5caed37 /translations | |
parent | 337d9318ad37e2917672897f2625f78ebe049657 (diff) | |
download | subsurface-77a6bc6d623148.tar.gz |
profile/planner: don't update dive in ProfileWidget2::plotDive()
In planner or profile-edit mode, the plotDive() function takes
the current plan and turns it into a dive profile. Not only
is this a layering violation (the display layer modifying the
dive), it is also fundamentally flawed. The control-flow is
out of control, if you wish. There are numerous reasons why
the profile needs to be replot, many of which do not need
a recalculated dive profile.
Move the code that updates the dive-profile to the
DivePlannerPointsModel. Thus, the profile recalculations
and replots can be pooled. This will break the planner, since
there now might be missing calls to the profile recalculation.
But it already has some positive effects: when removing
multiple points, the profile is only recalculated once.
This will need much more work, but it is a start.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'translations')
0 files changed, 0 insertions, 0 deletions