Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BACPORT] fix Merge shapefile to one crash when used layers mode
  • Loading branch information
alexbruy committed Dec 17, 2011
1 parent 61456ac commit 488dd05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/plugins/fTools/tools/doMergeShapes.py
Expand Up @@ -109,9 +109,9 @@ def accept( self ):
baseDir = QFileInfo( files[ 0 ] ).absolutePath()
else:
baseDir = self.leInputDir.text()

# look for shapes with specified geometry type
self.inputFiles = ftools_utils.getShapesByGeometryType( baseDir, self.inputFiles, self.cmbGeometry.currentIndex() )
# look for shapes with specified geometry type
self.inputFiles = ftools_utils.getShapesByGeometryType( baseDir, self.inputFiles, self.cmbGeometry.currentIndex() )
self.progressFiles.setRange( 0, self.inputFiles.count() )

self.progressFiles.setRange( 0, self.inputFiles.count() )

Expand All @@ -121,6 +121,9 @@ def accept( self ):
QMessageBox.warning( self, self.tr( "Delete error" ), self.tr( "Can't delete file %1" ).arg( outFileName ) )
return

if self.inEncoding == None:
self.inEncoding = "System"

self.btnOk.setEnabled( False )

self.mergeThread = ShapeMergeThread( baseDir, self.inputFiles, self.outFileName, self.encoding )
Expand Down

0 comments on commit 488dd05

Please sign in to comment.