Berthold Stoeger a988e3c135 core: initialize dive selection after resetting the data
The dive selection was initialized during data-reset. However,
this emitted a signal before all data-reset routines were run.
Ultimately, this led to access-after-free in the statistics code.

Instead, move the select_newest_visible_dive() signal from the
divelist-model to the process_loaded_dives() function. There
is no point in initializing the selection if the dive data
is cleared after all.

This change broke closing of the log, because the UI-selection
was not reset. Therefore, when clearing the data, clear the
selection before proceeding with clearing.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-31 13:54:23 +02:00
..
2019-08-08 08:56:44 -07:00
2020-12-17 08:10:56 -08:00
2020-10-24 09:51:37 -07:00
2020-10-24 09:51:37 -07:00
2020-09-29 16:13:03 -07:00
2021-03-12 22:24:23 +01:00
2021-03-12 22:24:23 +01:00
2018-10-21 19:55:09 +03:00
2021-02-10 14:33:15 -08:00
2021-02-10 14:33:15 -08:00
2021-03-08 16:29:04 -08:00
2021-01-06 10:18:23 -08:00
2021-03-24 10:30:22 -07:00
2020-10-24 09:51:37 -07:00
2020-04-18 13:41:29 +02:00
2019-12-13 07:04:00 -05:00
2020-12-29 08:34:09 -08:00
2020-03-10 17:42:54 -07:00
2020-03-10 17:42:54 -07:00
2020-05-03 15:02:21 -07:00