Prechádzať zdrojové kódy

d.vect.thematic: add flag to not show thematic layers in vector legend

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69308 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 rokov pred
rodič
commit
15e17d0946
1 zmenil súbory, kde vykonal 7 pridanie a 2 odobranie
  1. 7 2
      display/d.vect.thematic/main.c

+ 7 - 2
display/d.vect.thematic/main.c

@@ -59,7 +59,7 @@ int main(int argc, char **argv)
     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 @@ int main(int argc, char **argv)
     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 @@ int main(int argc, char **argv)
 
     /* 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) {