mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make get_surface_interval() member of dive_table
This function implicitely accessed the global divelog. To make that explicit make it a member of dive_table, such that the caller must access it via the global variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e9a57ac5f5
commit
cce5f5950c
3 changed files with 6 additions and 8 deletions
|
@ -167,7 +167,7 @@ void TabDiveInformation::updateProfile()
|
|||
// Update fields that depend on start of dive
|
||||
void TabDiveInformation::updateWhen()
|
||||
{
|
||||
timestamp_t surface_interval = get_surface_interval(parent.currentDive->when);
|
||||
timestamp_t surface_interval = divelog.dives.get_surface_interval(parent.currentDive->when);
|
||||
if (surface_interval >= 0)
|
||||
ui->surfaceIntervalText->setText(get_dive_surfint_string(surface_interval, tr("d"), tr("h"), tr("min")));
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue