From: Kaj-Michael Lang Date: Thu, 31 Jul 2008 12:14:57 +0000 (+0300) Subject: RepoManager: Use gtk_map_unit2ztile instead of unit2ztile X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b306494cfb4d979d3cc8ec9b1cd992fbe4bf96a6;p=mapper RepoManager: Use gtk_map_unit2ztile instead of unit2ztile --- diff --git a/src/map-repo-manager.c b/src/map-repo-manager.c index ff5a6e5..52df273 100644 --- a/src/map-repo-manager.c +++ b/src/map-repo-manager.c @@ -556,10 +556,10 @@ if (start_unity > end_unity) { for (i = 0; i < _curr_repo->max_zoom; i++) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mapman_info->chk_zoom_levels[i]))) { guint start_tilex, start_tiley, end_tilex, end_tiley; - start_tilex = unit2ztile(start_unitx, i); - start_tiley = unit2ztile(start_unity, i); - end_tilex = unit2ztile(end_unitx, i); - end_tiley = unit2ztile(end_unity, i); + start_tilex = gtk_map_unit2ztile(start_unitx, i); + start_tiley = gtk_map_unit2ztile(start_unity, i); + end_tilex = gtk_map_unit2ztile(end_unitx, i); + end_tiley = gtk_map_unit2ztile(end_unity, i); num_maps += (end_tilex - start_tilex + 1) * (end_tiley - start_tiley + 1); } } @@ -581,10 +581,10 @@ for (i = 0; i < _curr_repo->max_zoom; i++) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mapman_info->chk_zoom_levels[i]))) { guint start_tilex, start_tiley, end_tilex, end_tiley; guint tilex, tiley; - start_tilex = unit2ztile(start_unitx, i); - start_tiley = unit2ztile(start_unity, i); - end_tilex = unit2ztile(end_unitx, i); - end_tiley = unit2ztile(end_unity, i); + start_tilex = gtk_map_unit2ztile(start_unitx, i); + start_tiley = gtk_map_unit2ztile(start_unity, i); + end_tilex = gtk_map_unit2ztile(end_unitx, i); + end_tiley = gtk_map_unit2ztile(end_unity, i); for (tiley = start_tiley; tiley <= end_tiley; tiley++) for (tilex = start_tilex; tilex <= end_tilex; tilex++) @@ -612,8 +612,8 @@ for (i = 0; i < _curr_repo->max_zoom; i++) { for (curr = path->head - 1; curr++ != path->tail;) { if (curr->unity) { - guint tilex = unit2ztile(curr->unitx, i); - guint tiley = unit2ztile(curr->unity, i); + guint tilex = gtk_map_unit2ztile(curr->unitx, i); + guint tiley = gtk_map_unit2ztile(curr->unity, i); if (tilex != prev_tilex || tiley != prev_tiley) { if (prev_tiley) num_maps += (abs((gint) tilex - prev_tilex) + 1) * (abs((gint) tiley - prev_tiley) + 1) - 1; @@ -651,8 +651,8 @@ for (i = 0; i < _curr_repo->max_zoom; i++) { for (curr = path->head - 1; curr++ != path->tail;) { if (curr->unity) { - guint tilex = unit2ztile(curr->unitx, i); - guint tiley = unit2ztile(curr->unity, i); + guint tilex = gtk_map_unit2ztile(curr->unitx, i); + guint tiley = gtk_map_unit2ztile(curr->unity, i); if (tilex != prev_tilex || tiley != prev_tiley) { guint minx, miny, maxx, maxy, x, y; if (prev_tiley != 0) {