mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move dive-site functions into class
In analogy to the previous commit for dive-site-table. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
76c52c87a3
commit
2de6f69c19
20 changed files with 69 additions and 71 deletions
|
@ -344,7 +344,7 @@ void MergeDiveSites::redo()
|
|||
// the dives in the sitesToAdd vector.
|
||||
for (const std::unique_ptr<dive_site> &site: sitesToAdd) {
|
||||
for (dive *d: site->dives) {
|
||||
add_dive_to_dive_site(d, ds);
|
||||
ds->add_dive(d);
|
||||
divesChanged.push_back(d);
|
||||
}
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ ApplyGPSFixes::ApplyGPSFixes(const std::vector<DiveAndLocation> &fixes)
|
|||
} else {
|
||||
ds = divelog.sites->create(dl.name.toStdString());
|
||||
ds->location = dl.location;
|
||||
add_dive_to_dive_site(dl.d, ds);
|
||||
ds->add_dive(dl.d);
|
||||
dl.d->dive_site = nullptr; // This will be set on redo()
|
||||
sitesToAdd.emplace_back(ds);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue