[GRASS-SVN] r60393 - grass/branches/releasebranch_7_0/vector/v.edit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 21 08:06:25 PDT 2014


Author: hcho
Date: 2014-05-21 08:06:25 -0700 (Wed, 21 May 2014)
New Revision: 60393

Modified:
   grass/branches/releasebranch_7_0/vector/v.edit/main.c
Log:
v.edit: Don't build topology when no features selected (merge from r60392)

Modified: grass/branches/releasebranch_7_0/vector/v.edit/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.edit/main.c	2014-05-21 15:03:20 UTC (rev 60392)
+++ grass/branches/releasebranch_7_0/vector/v.edit/main.c	2014-05-21 15:06:25 UTC (rev 60393)
@@ -235,7 +235,9 @@
 	    }
 	    Vect_close(&Map);
 
-	    Vect_open_update2(&Map, params.map->answer, G_mapset(), params.fld->answer);
+	    if (Vect_open_update2(&Map, params.map->answer, G_mapset(), params.fld->answer) < 0)
+		G_fatal_error(_("Unable to open vector map <%s>"),
+				params.map->answer);
 	}
     }
 
@@ -463,8 +465,8 @@
     Vect_hist_command(&Map);
 
     /* build topology only if requested or if tool!=select */
-    if (!(action_mode == MODE_SELECT || params.topo->answer == 1 ||
-	 !MODE_NONE)) {
+    if (action_mode != MODE_SELECT && action_mode != MODE_NONE &&
+		    params.topo->answer != 1) {
 	Vect_build_partial(&Map, GV_BUILD_NONE);
 	Vect_build(&Map);
     }



More information about the grass-commit mailing list