Browse Source

v.extract: change layer option to G_OPT_V_FIELD_ALL, keep default answer 1

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72672 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 years ago
parent
commit
16908d0bc6
1 changed files with 3 additions and 2 deletions
  1. 3 2
      vector/v.extract/main.c

+ 3 - 2
vector/v.extract/main.c

@@ -100,7 +100,8 @@ int main(int argc, char **argv)
 
 
     opt.input = G_define_standard_option(G_OPT_V_INPUT);
     opt.input = G_define_standard_option(G_OPT_V_INPUT);
 
 
-    opt.field = G_define_standard_option(G_OPT_V_FIELD);
+    opt.field = G_define_standard_option(G_OPT_V_FIELD_ALL);
+    opt.field->answer = "1";
     opt.field->guisection = _("Selection");
     opt.field->guisection = _("Selection");
     
     
     opt.type = G_define_standard_option(G_OPT_V_TYPE);
     opt.type = G_define_standard_option(G_OPT_V_TYPE);
@@ -204,7 +205,7 @@ int main(int argc, char **argv)
         ((type & GV_AREA) || ((type & GV_CENTROID) && (type & GV_BOUNDARY)))) {
         ((type & GV_AREA) || ((type & GV_CENTROID) && (type & GV_BOUNDARY)))) {
 	dissolve = TRUE;
 	dissolve = TRUE;
 	if (field > 0 && opt.d_key->answer) {
 	if (field > 0 && opt.d_key->answer) {
-	    int i, ncols, ret;
+	    int ncols, ret;
 	    dbTable *Table;
 	    dbTable *Table;
 	    dbColumn *Col;
 	    dbColumn *Col;
 	    dbString tabname;
 	    dbString tabname;