mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
map-widget: use 'getter' function coordinate() for MapLocation
Avoid using qvariant_cast() with getRole() in favor of MapLocation::coordinate() in MapWidgetHelper::reloadMapLocations(). This makes the code more readble. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
b564debe21
commit
8bc61f42cb
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ void MapWidgetHelper::reloadMapLocations()
|
|||
// at least MIN_DISTANCE_BETWEEN_DIVE_SITES_M apart
|
||||
if (locationNameMap.contains(name)) {
|
||||
MapLocation *existingLocation = locationNameMap[name];
|
||||
QGeoCoordinate coord = qvariant_cast<QGeoCoordinate>(existingLocation->getRole(MapLocation::Roles::RoleCoordinate));
|
||||
QGeoCoordinate coord = existingLocation->coordinate();
|
||||
if (dsCoord.distanceTo(coord) < MIN_DISTANCE_BETWEEN_DIVE_SITES_M)
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue