Skip to content
Permalink
Browse files

Delete existing layer before writing to disk

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10102 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer
cfarmer committed Feb 3, 2009
1 parent 30de77f commit b26c7be881a8986d2b502673a4a5a190e9e81630
Showing with 5 additions and 0 deletions.
  1. +5 −0 python/plugins/fTools/tools/doGeoprocessing.py
@@ -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 )

0 comments on commit b26c7be

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