mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move process_import_dives() and related functions to divelog
These functions accessed the global divelog make this explicit. I'm still not happy about the situation, because these functions access global state, such as the selection. I think these should be moved up the call-chain. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b34116e2e2
commit
176f544106
14 changed files with 500 additions and 494 deletions
|
@ -565,11 +565,11 @@ void DownloadFromDCWidget::on_ok_clicked()
|
|||
if (currentState != DONE && currentState != ERRORED)
|
||||
return;
|
||||
|
||||
int flags = IMPORT_IS_DOWNLOADED;
|
||||
int flags = import_flags::is_downloaded;
|
||||
if (preferDownloaded())
|
||||
flags |= IMPORT_PREFER_IMPORTED;
|
||||
flags |= import_flags::prefer_imported;
|
||||
if (ui.createNewTrip->isChecked())
|
||||
flags |= IMPORT_ADD_TO_NEW_TRIP;
|
||||
flags |= import_flags::add_to_new_trip;
|
||||
|
||||
diveImportedModel->recordDives(flags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue