]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikcoord.c
Clarify text on map layer menu
[andy/viking.git] / src / vikcoord.c
index a4bbeadda3ee7175779398c07572acfae3e7e87b..163b52a67ec590b3f2f9e6280ff5d5692157e965 100644 (file)
@@ -152,9 +152,9 @@ void vik_coord_set_area(const VikCoord *coord, const struct LatLon *wh, VikCoord
   get_north_west(&center, &dist, &nw);
   get_south_east(&center, &dist, &se);
 
   get_north_west(&center, &dist, &nw);
   get_south_east(&center, &dist, &se);
 
-  tl->mode = br->mode = VIK_COORD_LATLON;
   *((struct LatLon *)tl) = nw;
   *((struct LatLon *)br) = se;
   *((struct LatLon *)tl) = nw;
   *((struct LatLon *)br) = se;
+  tl->mode = br->mode = VIK_COORD_LATLON;
 }
 
 gboolean vik_coord_inside(const VikCoord *coord, const VikCoord *tl, const VikCoord *br)
 }
 
 gboolean vik_coord_inside(const VikCoord *coord, const VikCoord *tl, const VikCoord *br)
@@ -165,11 +165,6 @@ gboolean vik_coord_inside(const VikCoord *coord, const VikCoord *tl, const VikCo
   vik_coord_to_latlon(tl, &tl_ll);
   vik_coord_to_latlon(br, &br_ll);
 
   vik_coord_to_latlon(tl, &tl_ll);
   vik_coord_to_latlon(br, &br_ll);
 
-#ifdef DEBUG
-  fprintf(stderr, "DEBUG: %s() ll=%f, %f tl=%f, %f br=%f, %f\n",
-      __PRETTY_FUNCTION__, ll.lat, ll.lon, tl_ll.lat, tl_ll.lon, br_ll.lat, br_ll.lon);
-#endif
-
   if ((ll.lat > tl_ll.lat) || (ll.lon < tl_ll.lon))
     return FALSE;
   if ((ll.lat  < br_ll.lat) || (ll.lon > br_ll.lon))
   if ((ll.lat > tl_ll.lat) || (ll.lon < tl_ll.lon))
     return FALSE;
   if ((ll.lat  < br_ll.lat) || (ll.lon > br_ll.lon))