mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Dive site: use displayed_dive in MainTab::refreshDisplayedDiveSite
MainTab::refreshDisplayedDiveSite() was used after dive-site edit to update the information of the location entry box. This should always display the dive-site of the currently shown/edited dive, therefore it makes no sense to use the displayed_dive_site here. Simply use the dive site of displayed_dive. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
73b8bd12e5
commit
ebd6d4fc45
1 changed files with 4 additions and 3 deletions
|
@ -656,9 +656,10 @@ MainTab::EditMode MainTab::getEditMode() const
|
|||
|
||||
void MainTab::refreshDisplayedDiveSite()
|
||||
{
|
||||
if (displayed_dive_site.uuid) {
|
||||
copy_dive_site(get_dive_site_by_uuid(displayed_dive_site.uuid), &displayed_dive_site);
|
||||
ui.location->setCurrentDiveSiteUuid(displayed_dive_site.uuid);
|
||||
struct dive_site *ds = get_dive_site_for_dive(&displayed_dive);
|
||||
if (ds) {
|
||||
copy_dive_site(ds, &displayed_dive_site);
|
||||
ui.location->setCurrentDiveSiteUuid(ds->uuid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue