Skip to content

Commit

Permalink
Add warning when no output file selected in the Merge tool in fTools. F…
Browse files Browse the repository at this point in the history
…ix #3210

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14634 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
alexbruy committed Nov 14, 2010
1 parent 043d701 commit a145479
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/plugins/fTools/tools/doMergeShapes.py
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 ):
Expand Down

0 comments on commit a145479

Please sign in to comment.