mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	| The DiveCalculatedCeiling profile-item has a recalc()
function, which calls "dataModel->calculateDecompression()".
This is a questionable reversal of control-flow: The
profile-item should paint the model-data not change it.
The code was supposed to be called under two conditions:
1) The value of the calcceiling3m preferences flag changed.
   This code was buggy for two reasons: Firstly, the cached
   value was always initialized to false, which means that
   sometimes the first call was missed. Secondly, the
   settingsChanged() functions was only called when closing
   the preferences window, not when changing the flag in the
   profile widgets.
2) The datetime of the dive changed. The whole control-flow is
   pretty absurd (due to "bit rot"):
     - The replan-dive command sends a date-time changed signal.
     - The main tab changes the date-time and informs the profile.
     - The profile sends a signal to the item.
     - The item instructs the model to recalculate the
       decompression.
     - The model causes the profile to be redrawn.
In any case, the whole thing is moot, because the decompression
is recalculated for *every* profile plot in create_plot_info_new().
Let's remove the code from the DiveCalculatedCeiling profile-item
and the calculateDecompression() function, which is now not
used anymore.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | ||
|---|---|---|
| .. | ||
| cleanertablemodel.cpp | ||
| cleanertablemodel.h | ||
| CMakeLists.txt | ||
| completionmodels.cpp | ||
| completionmodels.h | ||
| cylindermodel.cpp | ||
| cylindermodel.h | ||
| divecomputerextradatamodel.cpp | ||
| divecomputerextradatamodel.h | ||
| divecomputermodel.cpp | ||
| divecomputermodel.h | ||
| diveimportedmodel.cpp | ||
| diveimportedmodel.h | ||
| divelocationmodel.cpp | ||
| divelocationmodel.h | ||
| divepicturemodel.cpp | ||
| divepicturemodel.h | ||
| diveplannermodel.cpp | ||
| diveplannermodel.h | ||
| diveplotdatamodel.cpp | ||
| diveplotdatamodel.h | ||
| divesiteimportmodel.cpp | ||
| divesiteimportmodel.h | ||
| divesummarymodel.cpp | ||
| divesummarymodel.h | ||
| divetripmodel.cpp | ||
| divetripmodel.h | ||
| filterconstraintmodel.cpp | ||
| filterconstraintmodel.h | ||
| filtermodels.cpp | ||
| filtermodels.h | ||
| filterpresetmodel.cpp | ||
| filterpresetmodel.h | ||
| gpslistmodel.cpp | ||
| gpslistmodel.h | ||
| maplocationmodel.cpp | ||
| maplocationmodel.h | ||
| messagehandlermodel.cpp | ||
| messagehandlermodel.h | ||
| mobilelistmodel.cpp | ||
| mobilelistmodel.h | ||
| models.cpp | ||
| models.h | ||
| tankinfomodel.cpp | ||
| tankinfomodel.h | ||
| treemodel.cpp | ||
| treemodel.h | ||
| weightmodel.cpp | ||
| weightmodel.h | ||
| weightsysteminfomodel.cpp | ||
| weightsysteminfomodel.h | ||
| yearlystatisticsmodel.cpp | ||
| yearlystatisticsmodel.h | ||