Browse Source

Vlib: restore native vector format for new vector

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51395 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 years ago
parent
commit
15f5a9e004
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/vector/Vlib/open.c

+ 2 - 2
lib/vector/Vlib/open.c

@@ -693,6 +693,7 @@ int Vect_open_new(struct Map_info *Map, const char *name, int with_z)
     }
 
     /* determine output format native or ogr */
+    Map->format = GV_FORMAT_NATIVE;
     if (strcmp(G_program_name(), "v.external") != 0) {
 	if (G_find_file2("", "OGR", G_mapset())) {
 	    /* OGR */
@@ -785,10 +786,9 @@ int Vect_open_new(struct Map_info *Map, const char *name, int with_z)
 	    }
 	}
     }
-    else {
+    if (Map->format == GV_FORMAT_NATIVE) {
 	/* native */
 	G_debug(2, " using native format");
-	Map->format = GV_FORMAT_NATIVE;
 
 	/* check if map already exists */
 	if (G_find_vector2(name, G_mapset()) != NULL) {