浏览代码

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 年之前
父节点
当前提交
4e01e99a80
共有 1 个文件被更改,包括 12 次插入2 次删除
  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"));
 	}
     }