Przeglądaj źródła

d.vect: use Vect_get_map_box1() on level1 (see https://trac.osgeo.org/grass/ticket/3244)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70524 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 8 lat temu
rodzic
commit
4e01e99a80
1 zmienionych plików z 12 dodań i 2 usunięć
  1. 12 2
      display/d.vect/shape.c

+ 12 - 2
display/d.vect/shape.c

@@ -187,8 +187,18 @@ int display_shape(struct Map_info *Map, int type, struct cat_list *Clist, const
 	    z_style = NULL;
         }
 	else {
-	    Vect_get_map_box(Map, &box);
-	    Rast_make_fp_colors(&zcolors, z_style, box.B, box.T);
+            int ret;
+
+            ret = 0;
+            if (Vect_level(Map) > 1)
+                ret = Vect_get_map_box(Map, &box);
+            else
+                ret = Vect_get_map_box1(Map, &box);
+
+            if (ret == 1)
+                Rast_make_fp_colors(&zcolors, z_style, box.B, box.T);
+            else
+                G_warning(_("Unable to colorize features, unknown map bounding box"));
 	}
     }