소스 검색

wxGUI: fix importing files from directory and fix adding multiple bands to display after import

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68796 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 8 년 전
부모
커밋
aea19047b1
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      gui/wxpython/gui_core/gselect.py
  2. 2 2
      gui/wxpython/modules/import_export.py

+ 1 - 1
gui/wxpython/gui_core/gselect.py

@@ -2142,7 +2142,7 @@ class GdalSelect(wx.Panel):
                         dsn, "%s") % self._getExtPatternGlob(ext)):
                     baseName = os.path.basename(filename)
                     grassName = GetValidLayerName(baseName.split('.', -1)[0])
-                    projectionMatch = hasRastSameProjAsLocation(dsn)
+                    projectionMatch = hasRastSameProjAsLocation(filename)
                     projectionMatchCaption = getProjMatchCaption(
                         projectionMatch)
                     listData.append(

+ 2 - 2
gui/wxpython/modules/import_export.py

@@ -430,11 +430,11 @@ class GdalImportDialog(ImportDialog):
             if nBands < 0:
                 GWarning(_("Unable to determine number of raster bands"),
                          parent=self)
-            nBands = 1
+                nBands = 1
 
             userData['nbands'] = nBands
             cmd = self.getSettingsPageCmd()
-            cmd.append('input=%s' % dsn)
+            cmd.append('input=%s' % idsn)
             cmd.append('output=%s' % output)
 
             if self.overwrite.IsChecked():