mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
ec8e109a1a
The ProfileWidget2::recalcCeiling() function is used in one place, namely when an undo-command changes the mode. It recalculates decompression data and repaints the ceilings and thus avoids a full profile-redraw. This is smart, but it becomes problematic when the dive is changed and the ceiling is recalculated before the profile is redrawn. The DivePlotDataModel then still has data from the previous dive but cylinders of the new dive are accessed. This kind of situation may arise if multiple dive fields are updated, as for example when replanning a dive. Currently, this only causes a temporary mis-calculation. When removing MAX_CYLINDERS this will lead to crashes. One might attempt to fix the whole data-dependency mess. This commit goes the cheap route and simply redraws the profile when the mode is changed. Yes, it is in a way ineffective, but we do worse things. The ProfileWidget2::recalcCeiling() thus becomes unused and is removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
animationfunctions.cpp | ||
animationfunctions.h | ||
CMakeLists.txt | ||
divecartesianaxis.cpp | ||
divecartesianaxis.h | ||
diveeventitem.cpp | ||
diveeventitem.h | ||
divelineitem.cpp | ||
divelineitem.h | ||
divepixmapitem.cpp | ||
divepixmapitem.h | ||
diveprofileitem.cpp | ||
diveprofileitem.h | ||
diverectitem.cpp | ||
diverectitem.h | ||
divetextitem.cpp | ||
divetextitem.h | ||
divetooltipitem.cpp | ||
divetooltipitem.h | ||
profilewidget2.cpp | ||
profilewidget2.h | ||
qmlprofile.cpp | ||
qmlprofile.h | ||
ruleritem.cpp | ||
ruleritem.h | ||
tankitem.cpp | ||
tankitem.h |