浏览代码

wxGUI: fix bulk import (dir)
(merge https://trac.osgeo.org/grass/changeset/43544 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43545 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 14 年之前
父节点
当前提交
49be3f3cc7
共有 2 个文件被更改,包括 5 次插入7 次删除
  1. 3 3
      gui/wxpython/gui_modules/gdialogs.py
  2. 2 4
      gui/wxpython/gui_modules/render.py

+ 3 - 3
gui/wxpython/gui_modules/gdialogs.py

@@ -1147,15 +1147,15 @@ class GdalImportDialog(ImportDialog):
                            'output=%s' % output]
             else: # gdal
                 if self.dsnInput.GetType() == 'dir':
-                    dsn = os.path.join(dsn, layer)
+                    idsn = os.path.join(dsn, layer)
                 
                 if self.link:
                     cmd = ['r.external',
-                           'input=%s' % dsn,
+                           'input=%s' % idsn,
                            'output=%s' % output]
                 else:
                     cmd = ['r.in.gdal',
-                           'input=%s' % dsn,
+                           'input=%s' % idsn,
                            'output=%s' % output]
             
             if self.overwrite.IsChecked():

+ 2 - 4
gui/wxpython/gui_modules/render.py

@@ -613,11 +613,9 @@ class Map(object):
                               **cmd)
         if not ret:
             if rast:
-                message = _("Unable to zoom to raster map <%s>.") % rast[0] + \
-                    '%s%s' % (os.linesep, os.linesep) + e.message
+                message = _("Unable to zoom to raster map <%s>.") % rast[0]
             elif vect:
-                message = _("Unable to zoom to vector map <%s>.") % vect[0] + \
-                    '%s%s' % (os.linesep, os.linesep) + e.message
+                message = _("Unable to zoom to vector map <%s>.") % vect[0]
             else:
                 message = _("Unable to get current geographic extent. "
                             "Force quiting wxGUI. Please run manually g.region to "