mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't add a dive on the globe twice ( well, actually, different dives with same location )
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
7509360173
commit
cffc66f45a
1 changed files with 2 additions and 0 deletions
|
@ -52,6 +52,7 @@ void GlobeGPS::reload()
|
|||
|
||||
loadedDives = new GeoDataDocument;
|
||||
|
||||
diveLocations.clear();
|
||||
int idx = 0;
|
||||
struct dive *dive;
|
||||
for_each_dive(idx, dive) {
|
||||
|
@ -60,6 +61,7 @@ void GlobeGPS::reload()
|
|||
if( diveLocations.contains( QString(dive->location)))
|
||||
continue;
|
||||
|
||||
diveLocations.append( QString(dive->location) );
|
||||
GeoDataPlacemark *place = new GeoDataPlacemark( dive->location );
|
||||
place->setCoordinate(dive->longitude.udeg / 1000000.0,dive->latitude.udeg / 1000000.0 , 0, GeoDataCoordinates::Degree );
|
||||
loadedDives->append( place );
|
||||
|
|
Loading…
Add table
Reference in a new issue