subsurface/qt-models
Berthold Stoeger 975c123a30 profile: remove redundant code in DiveCalculatedCeiling
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>
2021-01-10 15:57:39 -08:00
..
cleanertablemodel.cpp Cleanup: return directly from data() methods 2019-06-19 13:11:10 -07:00
cleanertablemodel.h CylindersModel: fold CHANGED() macro into setData() 2020-04-07 00:13:35 +02:00
CMakeLists.txt build-system: add models and shared backends to the downloader 2020-12-03 13:26:55 -08:00
completionmodels.cpp desktop: automatically reload completion-models 2020-11-14 10:01:50 -08:00
completionmodels.h desktop: automatically reload completion-models 2020-11-14 10:01:50 -08:00
cylindermodel.cpp cylindermodel: remove in_planner() use 2020-11-24 10:54:10 +01:00
cylindermodel.h Make MND display depend on O2 narcotic preference 2020-07-11 10:37:49 -07:00
divecomputerextradatamodel.cpp cleanup: split out divecomputer functions from dive.c 2020-10-25 13:59:52 -07:00
divecomputerextradatamodel.h cleanup: generalize ExtraDataModel to display data of any dc 2020-05-07 08:46:15 -07:00
divecomputermodel.cpp cleanup: remove DiveComputerModel::remove 2020-10-25 13:59:04 -07:00
divecomputermodel.h cleanup: remove DiveComputerModel::remove 2020-10-25 13:59:04 -07:00
diveimportedmodel.cpp downloader: save downloaded dives 2020-12-03 13:26:55 -08:00
diveimportedmodel.h downloader: wait for download thread 2020-12-03 13:26:55 -08:00
divelocationmodel.cpp desktop: fix saving of column-widths of device and site tables 2020-11-07 11:37:51 -08:00
divelocationmodel.h desktop: fix saving of column-widths of device and site tables 2020-11-07 11:37:51 -08:00
divepicturemodel.cpp cleanup: use getDiveSelection() to loop over selected dives 2020-10-03 10:01:13 -07:00
divepicturemodel.h undo: make picture (media) deletion undoable 2020-05-06 13:58:09 -07:00
diveplannermodel.cpp diveplannermodel: replace in_planner() by isPlanner() 2020-11-24 10:54:10 +01:00
diveplannermodel.h planner: send plan in calculatedPlanNotes 2020-05-04 10:42:07 +02:00
diveplotdatamodel.cpp profile: remove redundant code in DiveCalculatedCeiling 2021-01-10 15:57:39 -08:00
diveplotdatamodel.h profile: remove redundant code in DiveCalculatedCeiling 2021-01-10 15:57:39 -08:00
divesiteimportmodel.cpp Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesiteimportmodel.h Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesummarymodel.cpp cleanup: consistently use get_cylinder() accessor 2020-08-21 08:48:22 -07:00
divesummarymodel.h mobile/summary: add section headers 2020-02-08 10:29:36 -08:00
divetripmodel.cpp filter: reset shown_dives in filter 2020-12-29 08:34:09 -08:00
divetripmodel.h cleanup: invert control-flow when resetting the core structures 2020-05-07 08:43:27 -07:00
filterconstraintmodel.cpp filter: add filter constraint model 2020-09-29 16:13:03 -07:00
filterconstraintmodel.h filter: add filter constraint model 2020-09-29 16:13:03 -07:00
filtermodels.cpp cleanup: invert control-flow when resetting the core structures 2020-05-07 08:43:27 -07:00
filtermodels.h cleanup: invert control-flow when resetting the core structures 2020-05-07 08:43:27 -07:00
filterpresetmodel.cpp filter: connect DiveListNotifier signals to filter preset model 2020-09-29 16:13:03 -07:00
filterpresetmodel.h filter: connect DiveListNotifier signals to filter preset model 2020-09-29 16:13:03 -07:00
gpslistmodel.cpp fix potential crash in GPS code 2021-01-01 12:38:50 -08:00
gpslistmodel.h Cleanup: Make constructor of singletons private 2019-10-04 09:19:10 -07:00
maplocationmodel.cpp build-system: add models and shared backends to the downloader 2020-12-03 13:26:55 -08:00
maplocationmodel.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
messagehandlermodel.cpp debug output: ensure our debug output is captured on Android 2020-04-18 09:00:21 -07:00
messagehandlermodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
mobilelistmodel.cpp filter: internalize shown_dives in DiveFilter class 2020-12-29 08:34:09 -08:00
mobilelistmodel.h core: create string-format.cpp source file 2020-12-17 13:03:56 -08:00
models.cpp cleanup: remove getDivesInTrip() in qthelper.cpp 2020-12-29 08:34:09 -08:00
models.h Cleanup: remove includes from qt-models/models.h 2019-07-18 05:42:55 -07:00
tankinfomodel.cpp core: keep tank infos in a dynamic table 2020-12-13 11:49:59 -08:00
tankinfomodel.h core: keep tank infos in a dynamic table 2020-12-13 11:49:59 -08:00
treemodel.cpp Cleanup: make DiveTripModel a global object 2018-09-01 07:48:43 -07:00
treemodel.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
weightmodel.cpp desktop: refine auto-fill of weights 2020-09-12 10:36:36 -07:00
weightmodel.h cleanup: replace to "dive.h" includes by more specific includes 2020-05-15 14:19:21 -07:00
weightsysteminfomodel.cpp cleanup: invert control-flow when resetting the core structures 2020-05-07 08:43:27 -07:00
weightsysteminfomodel.h Cleanup: implement proper Qt-model semantics in WeightInfoModel 2019-04-29 13:06:39 -07:00
yearlystatisticsmodel.cpp Core: dynamically allocate the result of get_gas_used() 2019-11-09 19:19:04 +01:00
yearlystatisticsmodel.h Show average max depth in yearly statistics 2018-12-17 12:18:26 +01:00