subsurface/desktop-widgets/tab-widgets
Berthold Stoeger 9310d72943 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>
2020-03-18 13:27:16 -07:00
..
maintab.cpp models: update divesite-model when clearing/updating dive model 2020-03-18 13:27:16 -07:00
maintab.h cleanup: remove MainTab::modified 2020-02-27 14:49:01 -08:00
maintab.ui Fixes in tab widget UI layout 2019-11-16 08:32:07 -08:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveEquipment.cpp cleanup: remove weightsystems_equal function 2020-02-27 14:49:01 -08:00
TabDiveEquipment.h Cylinders: Add CylindersModelFiltered 2020-02-11 20:37:09 -08:00
TabDiveEquipment.ui Move the Suit text box from the Notes tab to the Equipment tab 2019-08-08 09:12:09 -07:00
TabDiveExtraInfo.cpp Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Cleanup: Move dive-equipment tab into own translation units 2019-04-15 10:30:04 +12:00
TabDiveInformation.cpp code cleanup: add missing initialization 2020-01-10 02:37:03 +09:00
TabDiveInformation.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveInformation.ui desktop UI: small cleanups of salinity code 2020-01-06 07:00:34 +09:00
TabDivePhotos.cpp Grammar: replaces 'indexes' by 'indices' 2020-03-11 08:26:30 -07:00
TabDivePhotos.h Write dive data as video subtitles 2019-04-16 20:38:19 +02:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveSite.cpp Grammar: replaces 'indexes' by 'indices' 2020-03-11 08:26:30 -07:00
TabDiveSite.h Desktop: don't connect to remove() slot of model from TableModel 2019-12-05 10:14:25 -08:00
TabDiveSite.ui Dive sites: add fulltext filter 2019-04-12 18:19:07 +03:00
TabDiveStatistics.cpp Cleanup: use quotation marks for non-system includes 2019-12-04 13:00:23 +01:00
TabDiveStatistics.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
TabDiveStatistics.ui Show average max depth in statistics tab 2018-12-17 12:18:26 +01:00