Add warning when no output file selected in the Merge tool in fTools. Fix #3210

git-svn-id: http://svn.osgeo.org/qgis/trunk@14634 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
alexbruy 2010-11-14 09:56:52 +00:00
parent aa79855f01
commit 209fa1bba4

View File

@ -18,6 +18,7 @@ class Dialog( QDialog, Ui_Dialog ):
self.mergeThread = None
self.inputFiles = None
self.outFileName = None
self.btnOk = self.buttonBox.button( QDialogButtonBox.Ok )
self.btnClose = self.buttonBox.button( QDialogButtonBox.Close )
@ -96,6 +97,11 @@ class Dialog( QDialog, Ui_Dialog ):
self.progressFiles.setRange( 0, self.inputFiles.count() )
if self.outFileName is None:
QMessageBox.warning( self, self.tr( "No output file" ),
self.tr( "Please specify output file." ) )
return
outFile = QFile( self.outFileName )
if outFile.exists():
if not QgsVectorFileWriter.deleteShapeFile( self.outFileName ):