Skip to content

Commit

Permalink
Delete existing layer before writing to disk
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@10102 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Feb 3, 2009
1 parent 792862b commit 593a64e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/fTools/tools/doGeoprocessing.py
Expand Up @@ -139,6 +139,11 @@ def manageGui( self ):
#8: Clip

def geoprocessing( self, myLayerA, myLayerB, myParam, myMerge ):
check = QFile( self.shapefileName )
if check.exists():
if not QgsVectorFileWriter.deleteShapeFile( self.shapefileName ):
QMessageBox.warning( self, "Geoprocessing", self.tr( "Unable to delete existing shapefile." ) )
return
self.testThread = geoprocessingThread( self.iface.mainWindow(), self, self.myFunction, myLayerA,
myLayerB, myParam, myMerge, self.shapefileName, self.encoding )
QObject.connect( self.testThread, SIGNAL( "runFinished(PyQt_PyObject)" ), self.runFinishedFromThread )
Expand Down

0 comments on commit 593a64e

Please sign in to comment.