[GRASS-SVN] r41946 - in grass/trunk: display/d.vect lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 21 07:00:04 EDT 2010
Author: martinl
Date: 2010-04-21 07:00:04 -0400 (Wed, 21 Apr 2010)
New Revision: 41946
Modified:
grass/trunk/display/d.vect/main.c
grass/trunk/lib/gis/parser_standard_options.c
Log:
layer required (for direct OGR access)
Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c 2010-04-21 10:21:33 UTC (rev 41945)
+++ grass/trunk/display/d.vect/main.c 2010-04-21 11:00:04 UTC (rev 41946)
@@ -120,6 +120,11 @@
map_opt = G_define_standard_option(G_OPT_V_MAP);
+ field_opt = G_define_standard_option(G_OPT_V_FIELD);
+ field_opt->label =
+ _("Layer number (if -1, all layers are displayed)");
+ field_opt->gisprompt = "old_layer,layer,layer_all";
+
display_opt = G_define_option();
display_opt->key = "display";
display_opt->type = TYPE_STRING;
@@ -134,19 +139,14 @@
type_opt->answer = "point,line,boundary,centroid,area,face";
type_opt->options = "point,line,boundary,centroid,area,face";
type_opt->guisection = _("Selection");
-
- field_opt = G_define_standard_option(G_OPT_V_FIELD);
- field_opt->label =
- _("Layer number (if -1, all layers are displayed)");
- field_opt->gisprompt = "old_layer,layer,layer_all";
- field_opt->guisection = _("Selection");
-
+
cat_opt = G_define_standard_option(G_OPT_V_CATS);
cat_opt->guisection = _("Selection");
where_opt = G_define_standard_option(G_OPT_DB_WHERE);
where_opt->guisection = _("Selection");
+
/* Colors */
color_opt = G_define_option();
color_opt->key = "color";
@@ -242,6 +242,7 @@
/* Labels */
lfield_opt = G_define_standard_option(G_OPT_V_FIELD);
lfield_opt->key = "llayer";
+ lfield_opt->required = NO;
lfield_opt->guisection = _("Labels");
lfield_opt->description =
_("Layer number for labels (default: the given layer number)");
Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c 2010-04-21 10:21:33 UTC (rev 41945)
+++ grass/trunk/lib/gis/parser_standard_options.c 2010-04-21 11:00:04 UTC (rev 41946)
@@ -368,7 +368,7 @@
case G_OPT_V_FIELD:
Opt->key = "layer";
Opt->type = TYPE_STRING;
- Opt->required = NO;
+ Opt->required = YES;
Opt->answer = "1";
Opt->label = _("Layer number or name");
Opt->description =
@@ -380,7 +380,7 @@
case G_OPT_V_FIELD_ALL:
Opt->key = "layer";
Opt->type = TYPE_STRING;
- Opt->required = NO;
+ Opt->required = YES;
Opt->answer = "-1";
Opt->label = _("Layer number or name ('-1' for all layers)");
Opt->description =
More information about the grass-commit
mailing list