[GRASS-SVN] r50272 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 18 10:11:30 EST 2012
Author: martinl
Date: 2012-01-18 07:11:30 -0800 (Wed, 18 Jan 2012)
New Revision: 50272
Modified:
grass/trunk/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI/importer: don't close window
fix AddLayers on error
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-01-18 15:07:59 UTC (rev 50271)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2012-01-18 15:11:30 UTC (rev 50272)
@@ -1654,11 +1654,10 @@
def AddLayers(self, returncode, cmd = None):
"""!Add imported/linked layers into layer tree"""
- self.commandId += 1
-
if not self.add.IsChecked() or returncode != 0:
return
+ self.commandId += 1
maptree = self.parent.curr_page.maptree
layer, output = self.list.GetLayers()[self.commandId]
@@ -1745,11 +1744,9 @@
def OnRun(self, event):
"""!Import/Link data (each layes as separate vector map)"""
+ self.commandId = -1
data = self.list.GetLayers()
- # hide dialog
- self.Hide()
-
dsn = self.dsnInput.GetDsn()
ext = self.dsnInput.GetFormatExt()
@@ -1796,8 +1793,6 @@
self.parent.goutput.RunCmd(cmd, switchPage = True,
onDone = self.AddLayers)
- self.OnCancel()
-
def _getCommand(self):
"""!Get command"""
if self.link:
More information about the grass-commit
mailing list