[GRASS-SVN] r54385 - grass/trunk/gui/wxpython/iclass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 24 06:52:33 PST 2012


Author: annakrat
Date: 2012-12-24 06:52:33 -0800 (Mon, 24 Dec 2012)
New Revision: 54385

Modified:
   grass/trunk/gui/wxpython/iclass/frame.py
Log:
wxGUI/iclass: remove db connection before export

Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py	2012-12-24 14:48:51 UTC (rev 54384)
+++ grass/trunk/gui/wxpython/iclass/frame.py	2012-12-24 14:52:33 UTC (rev 54385)
@@ -620,6 +620,12 @@
         RunCommand('g.copy',
                     vect = ','.join([self.trainingAreaVector, vectorName]),
                     overwrite = True)
+        # remove connection if exists:
+        dbinfo = grass.vector_db(vectorName)
+        if dbinfo:
+            for layer in dbinfo.keys():
+                RunCommand('v.db.connect', flags = 'd', map = vectorName, layer = layer)
+
         mapset = grass.gisenv()['MAPSET']
         self.poMapInfo = displayDriver.OpenMap(name = self.trainingAreaVector, mapset = mapset)
             



More information about the grass-commit mailing list