From cffc66f45a9532076b9001825c51818df4688e3c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 17 May 2013 22:56:21 -0300 Subject: Don't add a dive on the globe twice ( well, actually, different dives with same location ) Signed-off-by: Tomaz Canabrava --- qt-ui/globe.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 56c99849c..ef8932773 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -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 ); -- cgit v1.2.3-70-g09d2