Skip to content

Commit 209fa1b

Browse files
author
alexbruy
committedNov 14, 2010
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
1 parent aa79855 commit 209fa1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎python/plugins/fTools/tools/doMergeShapes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__( self, iface ):
1818

1919
self.mergeThread = None
2020
self.inputFiles = None
21+
self.outFileName = None
2122

2223
self.btnOk = self.buttonBox.button( QDialogButtonBox.Ok )
2324
self.btnClose = self.buttonBox.button( QDialogButtonBox.Close )
@@ -96,6 +97,11 @@ def accept( self ):
9697

9798
self.progressFiles.setRange( 0, self.inputFiles.count() )
9899

100+
if self.outFileName is None:
101+
QMessageBox.warning( self, self.tr( "No output file" ),
102+
self.tr( "Please specify output file." ) )
103+
return
104+
99105
outFile = QFile( self.outFileName )
100106
if outFile.exists():
101107
if not QgsVectorFileWriter.deleteShapeFile( self.outFileName ):

0 commit comments

Comments
 (0)
Please sign in to comment.