Skip to content
Permalink
Browse files

Add warning when no output file selected in the Merge tool in fTools. F…

…ix #3210

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14634 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy
alexbruy committed Nov 14, 2010
1 parent 043d701 commit a14547916643f038c2b5f5a252fb33e4e1bbc827
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/plugins/fTools/tools/doMergeShapes.py
@@ -18,6 +18,7 @@ def __init__( self, iface ):

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 @@ def accept( self ):

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 ):

0 comments on commit a145479

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