Skip to content
Permalink
Browse files

[ftools,gdaltools] Errors in Merge Shapefiles and Split vector layer

* Fix #8120
* Fix #8119
  • Loading branch information
m-kuhn committed Jun 20, 2013
1 parent 1842287 commit 09a9a81bb0ff3edfdc5090300dd050e88ec0cd9c
Showing with 5 additions and 5 deletions.
  1. +4 −4 python/plugins/fTools/tools/doMergeShapes.py
  2. +1 −1 python/plugins/fTools/tools/doVectorSplit.py
@@ -61,15 +61,15 @@ def inputDir( self ):
nameFilter = [ "*.shp", "*.SHP" ]
workDir.setNameFilters( nameFilter )
self.inputFiles = workDir.entryList()
if self.inputFiles.count() == 0:
if len( self.inputFiles ) == 0:
QMessageBox.warning( self, self.tr( "No shapefiles found" ),
self.tr( "There are no shapefiles in this directory. Please select another one." ) )
self.inputFiles = None
return

settings.setValue( "/fTools/lastShapeDir", inDir )

self.progressFiles.setRange( 0, self.inputFiles.count() )
self.progressFiles.setRange( 0, len( self.inputFiles ) )
self.leInputDir.setText( inDir )

def outFile( self ):
@@ -121,7 +121,7 @@ def accept( self ):
nameFilter = [ "*.shp" << "*.SHP" ]
workDir.setNameFilters( nameFilter )
self.inputFiles = workDir.entryList()
if self.inputFiles.count() == 0:
if len( self.inputFiles ) == 0:
QMessageBox.warning( self, self.tr( "No shapefiles found" ),
self.tr( "There are no shapefiles in this directory. Please select another one." ) )
self.inputFiles = None
@@ -143,7 +143,7 @@ def accept( self ):
QMessageBox.warning( self, self.tr( "No shapefiles found" ),
self.tr( "There are no shapefiles with the given geometry type. Please select an available geometry type." ) )
return
self.progressFiles.setRange( 0, self.inputFiles.count() )
self.progressFiles.setRange( 0, len( self.inputFiles ) )

outFile = QFile( self.outFileName )
if outFile.exists():
@@ -172,7 +172,7 @@ def run(self):


for i in unique:
check = QFile(baseName + "_" + unicode(i.strip()) + ".shp")
check = QFile(baseName + "_" + unicode(i).strip() + ".shp")
fName = check.fileName()
if check.exists():
if not QgsVectorFileWriter.deleteShapeFile(fName):

0 comments on commit 09a9a81

Please sign in to comment.
You can’t perform that action at this time.