mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Core: move autogroup() into divelist.c
After loading or importing, the caller usually called autogroup() to autogroup dives if so wished by the user. This has already led to bugs, when autogroup() was forgotten. Instead, call autogroup() directly in the process_loaded_dives() and process_imported_dives() functions. Not only does this prevent forgetting the call - it also means that autogrouping can be changed without changing every caller. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7923507e76
commit
f8327ed51b
6 changed files with 7 additions and 9 deletions
|
|
@ -525,7 +525,6 @@ void DownloadFromDCWidget::on_ok_clicked()
|
|||
// first new dive) and select it again after processing all the dives
|
||||
int uniqId = table->dives[table->nr - 1]->id;
|
||||
process_imported_dives(table, preferDownloaded(), true);
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
// after process_imported_dives does any merging or resorting needed, we need
|
||||
// to recreate the model for the dive list so we can select the newest dive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue