[GRASS-SVN] r70524 - grass/trunk/display/d.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 10 01:30:00 PST 2017
Author: martinl
Date: 2017-02-10 01:30:00 -0800 (Fri, 10 Feb 2017)
New Revision: 70524
Modified:
grass/trunk/display/d.vect/shape.c
Log:
d.vect: use Vect_get_map_box1() on level1 (see #3244)
Modified: grass/trunk/display/d.vect/shape.c
===================================================================
--- grass/trunk/display/d.vect/shape.c 2017-02-10 09:29:17 UTC (rev 70523)
+++ grass/trunk/display/d.vect/shape.c 2017-02-10 09:30:00 UTC (rev 70524)
@@ -187,8 +187,18 @@
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"));
}
}
More information about the grass-commit
mailing list