]> err.no Git - mapper/commitdiff
RepoManager: Use gtk_map_unit2ztile instead of unit2ztile
authorKaj-Michael Lang <milang@tal.org>
Thu, 31 Jul 2008 12:14:57 +0000 (15:14 +0300)
committerKaj-Michael Lang <milang@tal.org>
Thu, 31 Jul 2008 12:14:57 +0000 (15:14 +0300)
src/map-repo-manager.c

index ff5a6e5b7dd3dfdb87642c5f63e1aa9f77ea2ea9..52df2731066612eaa7497da840304ac14e5d3a4b 100644 (file)
@@ -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) {