[GRASS-SVN] r50723 - grass/trunk/gui/wxpython/iclass
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 8 06:00:09 EST 2012
Author: annakrat
Date: 2012-02-08 03:00:09 -0800 (Wed, 08 Feb 2012)
New Revision: 50723
Modified:
grass/trunk/gui/wxpython/iclass/frame.py
Log:
wxGUI/wxIClass: fix exported vector map
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2012-02-08 09:11:04 UTC (rev 50722)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2012-02-08 11:00:09 UTC (rev 50723)
@@ -172,6 +172,7 @@
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
def OnCloseWindow(self, event):
+ self.GetFirstWindow().digit.GetDisplay().CloseMap()
self.Destroy()
def __del__(self):
@@ -612,20 +613,14 @@
wx.BeginBusyCursor()
wx.Yield()
- # build the temporary or the new one?
- RunCommand('v.build',
- map = self.trainingAreaVector,
- quiet = True)
- # copy temp vector with no table
- ret, msg = RunCommand('g.copy',
- vect = [self.trainingAreaVector, vectorName],
- overwrite = True,
- getErrorMsg = True)
- if ret != 0:
- wx.EndBusyCursor()
- GMessage(parent = self, message = _("Failed to copy vector map. "
- "Details:\n%s" % msg))
- return
+ # close, build, copy and open again the temporary vector
+ displayDriver = self.GetFirstWindow().digit.GetDisplay()
+ displayDriver.CloseMap()
+ RunCommand('g.copy',
+ vect = ','.join([self.trainingAreaVector, vectorName]),
+ overwrite = True)
+ mapset = grass.gisenv()['MAPSET']
+ self.poMapInfo = displayDriver.OpenMap(name = self.trainingAreaVector, mapset = mapset)
if not withTable:
wx.EndBusyCursor()
More information about the grass-commit
mailing list