[GRASS-SVN] r69308 - grass/trunk/display/d.vect.thematic
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 30 20:11:15 PDT 2016
Author: annakrat
Date: 2016-08-30 20:11:15 -0700 (Tue, 30 Aug 2016)
New Revision: 69308
Modified:
grass/trunk/display/d.vect.thematic/main.c
Log:
d.vect.thematic: add flag to not show thematic layers in vector legend
Modified: grass/trunk/display/d.vect.thematic/main.c
===================================================================
--- grass/trunk/display/d.vect.thematic/main.c 2016-08-31 03:05:21 UTC (rev 69307)
+++ grass/trunk/display/d.vect.thematic/main.c 2016-08-31 03:11:15 UTC (rev 69308)
@@ -59,7 +59,7 @@
struct Option *icon_area_opt;
struct Option *size_opt;
struct Option *title_opt;
- struct Flag *legend_flag, *algoinfo_flag, *nodraw_flag;
+ struct Flag *legend_flag, *algoinfo_flag, *nodraw_flag, *vlegend_flag;
char *desc, *deprecated;
struct cat_list *Clist;
@@ -238,6 +238,11 @@
algoinfo_flag->description = deprecated;
algoinfo_flag->guisection = _("Legend");
+ vlegend_flag = G_define_flag();
+ vlegend_flag->key = 's';
+ vlegend_flag->label = _("Do not show this layer in vector legend");
+ vlegend_flag->guisection = _("Legend");
+
G_option_required(algo_opt, breaks_opt, NULL);
G_option_exclusive(algo_opt, breaks_opt, NULL);
G_option_requires(algo_opt, nbclass_opt, NULL);
@@ -563,7 +568,7 @@
/* Write into default legfile */
leg_file = getenv("GRASS_LEGEND_FILE");
- if (leg_file) {
+ if (leg_file && !vlegend_flag->answer) {
while (TRUE) {
nfeatures = Vect_get_num_primitives(&Map, GV_POINT);
if (nfeatures > 0) {
More information about the grass-commit
mailing list