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 9f1f070 commit a20cec3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/plugins/fTools/tools/doMergeShapes.py
Expand Up @@ -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"

Expand Down

0 comments on commit a20cec3

Please sign in to comment.