]> git.street.me.uk Git - andy/viking.git/commitdiff
Reduce scope of a variable.
authorRob Norris <rw_norris@hotmail.com>
Sun, 29 Jan 2012 15:11:16 +0000 (15:11 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sun, 29 Jan 2012 15:11:16 +0000 (15:11 +0000)
src/vikmapslayer.c

index c579390760b259bcbf1c5a985b3694910d114da4..6240cd2675dc2a03139b96bad506027dc791e77e 100644 (file)
@@ -774,8 +774,6 @@ static void maps_layer_draw_section ( VikMapsLayer *vml, VikViewport *vvp, VikCo
       gdouble xx, yy; gint xx_tmp, yy_tmp;
       gint base_yy, xend, yend;
 
-      GdkGC *black_gc = GTK_WIDGET(vvp)->style->black_gc;
-
       xend = (xinc == 1) ? (xmax+1) : (xmin-1);
       yend = (yinc == 1) ? (ymax+1) : (ymin-1);
 
@@ -798,6 +796,7 @@ static void maps_layer_draw_section ( VikMapsLayer *vml, VikViewport *vvp, VikCo
                      vml->cache_dir, mode,
                      ulm.scale, ulm.z, ulm.x, ulm.y );
             if ( g_file_test ( path_buf, G_FILE_TEST_EXISTS ) == TRUE ) {
+             GdkGC *black_gc = GTK_WIDGET(vvp)->style->black_gc;
               vik_viewport_draw_line ( vvp, black_gc, xx+tilesize_x_ceil, yy, xx, yy+tilesize_y_ceil );
             }
           } else {