Skip to content
Permalink
Browse files
[BACPORT] fix Merge shapefile to one crash when used layers mode
  • Loading branch information
alexbruy committed Dec 17, 2011
1 parent 9f1f070 commit a20cec38245d8b12c4fa5b42a58f9b0d95b0ded2
Showing with 3 additions and 4 deletions.
  1. +3 −4 python/plugins/fTools/tools/doMergeShapes.py
@@ -116,17 +116,16 @@ 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() )
self.progressFiles.setRange( 0, self.inputFiles.count() )

outFile = QFile( self.outFileName )
if outFile.exists():
if not QgsVectorFileWriter.deleteShapeFile( self.outFileName ):
QMessageBox.warning( self, self.tr( "Delete error" ), self.tr( "Can't delete file %1" ).arg( outFileName ) )
return

# 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() )

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

0 comments on commit a20cec3

Please sign in to comment.