Dive site: select dive site when entering edit mode

Commit 0aef04352a made it impossible
to move new dive sites on the map. When entering dive-site-edit mode,
the filter would be instructed to show only dives of the corresponding
dive site [which didn't yet exist] and therefore all dive sites
on the map were deselected.

Fix this by explicitly centering on the dive site to be edited in
MapWidgetHelper::enterEditMode().

Fixes #1809

Reported-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-18 12:12:43 +02:00 committed by Dirk Hohndel
parent 5a65bb75da
commit 0416e54049

View file

@ -302,6 +302,7 @@ void MapWidgetHelper::enterEditMode(quint32 uuid)
} else {
coord = exists->coordinate();
}
centerOnDiveSiteUUID(uuid);
emit coordinatesChanged(degrees_t { (int)lrint(coord.latitude() * 1000000.0) },
degrees_t { (int)lrint(coord.longitude() * 1000000.0) });
emit editModeChanged();