mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +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> |
||
---|---|---|
.. | ||
maintab.cpp | ||
maintab.h | ||
maintab.ui | ||
TabBase.cpp | ||
TabBase.h | ||
TabDiveEquipment.cpp | ||
TabDiveEquipment.h | ||
TabDiveEquipment.ui | ||
TabDiveExtraInfo.cpp | ||
TabDiveExtraInfo.h | ||
TabDiveExtraInfo.ui | ||
TabDiveInformation.cpp | ||
TabDiveInformation.h | ||
TabDiveInformation.ui | ||
TabDivePhotos.cpp | ||
TabDivePhotos.h | ||
TabDivePhotos.ui | ||
TabDiveSite.cpp | ||
TabDiveSite.h | ||
TabDiveSite.ui | ||
TabDiveStatistics.cpp | ||
TabDiveStatistics.h | ||
TabDiveStatistics.ui |