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
|
@ -617,7 +617,6 @@ void MainWindow::on_actionCloudstorageopen_triggered()
|
|||
if (!parse_file(fileNamePtr.data(), &dive_table))
|
||||
setCurrentFile(fileNamePtr.data());
|
||||
process_loaded_dives();
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
hideProgressBar();
|
||||
refreshDisplay();
|
||||
|
@ -1715,7 +1714,6 @@ void MainWindow::importFiles(const QStringList fileNames)
|
|||
parse_file(fileNamePtr.data(), &table);
|
||||
}
|
||||
process_imported_dives(&table, false, false);
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
refreshDisplay();
|
||||
}
|
||||
|
@ -1739,7 +1737,6 @@ void MainWindow::loadFiles(const QStringList fileNames)
|
|||
hideProgressBar();
|
||||
updateRecentFiles();
|
||||
process_loaded_dives();
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
|
||||
refreshDisplay();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue