mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Delete existing layer before writing to disk
git-svn-id: http://svn.osgeo.org/qgis/trunk@10102 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
792862baa3
commit
593a64ed6c
@ -139,6 +139,11 @@ class GeoprocessingDialog( QDialog, Ui_Dialog ):
|
||||
#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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user