mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make register_dive() member of dive_table
This one is for symmetry with unregister_dive(). However, it makes me unhappy, because it modifies global state, namely the selection machinery and the fulltext. I think these should be moved up in the call chain. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
271df8962b
commit
f3b8e3c4aa
3 changed files with 9 additions and 6 deletions
|
@ -72,7 +72,7 @@ dive *DiveListBase::addDive(DiveToAdd &d)
|
|||
d.site->add_dive(d.dive.get());
|
||||
diveSiteCountChanged(d.site);
|
||||
}
|
||||
return register_dive(std::move(d.dive)); // Transfer ownership to core and update fulltext index
|
||||
return divelog.dives.register_dive(std::move(d.dive)); // Transfer ownership to core and update fulltext index
|
||||
}
|
||||
|
||||
// Some signals are sent in batches per trip. To avoid writing the same loop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue