summaryrefslogtreecommitdiffstats
path: root/qt-models/tankinfomodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-18 19:35:25 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-18 13:27:16 -0700
commit9310d72943390f95d6742c2d5b40f025a40b4008 (patch)
tree6c6e4226a75893b5736acb89c473bd7dcac6d532 /qt-models/tankinfomodel.cpp
parent9722f04e40a575ca757868a66cecfdcee801831c (diff)
downloadsubsurface-9310d72943390f95d6742c2d5b40f025a40b4008.tar.gz
models: update divesite-model when clearing/updating dive model
When the dive list is cleared or updated, the entries in the divesite-model become stale and therefore the divesite-model (with the actual name LocationInformationModel) also must be updated. This was done manually in some parts of the code and forgotten in others. Therefore, do it directly in the clear() and reset() function of the dive list-model. This might be a bit of a layering violation: why should one model call into another if they are not in parent/child relationship? However, this seems easier than introducing a global "reset dives" function that coordinates the models. Moreover, it does not appear 100% safe: if the clearing of the divesite model causes accesses to the divelist-model, they happen in the midst of a model reset and we had horrible bugs with that kind of things. However, I don't think that should happen. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/tankinfomodel.cpp')
0 files changed, 0 insertions, 0 deletions