[QGIS Commit] r14634 - trunk/qgis/python/plugins/fTools/tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Nov 14 04:56:52 EST 2010


Author: alexbruy
Date: 2010-11-14 01:56:52 -0800 (Sun, 14 Nov 2010)
New Revision: 14634

Modified:
   trunk/qgis/python/plugins/fTools/tools/doMergeShapes.py
Log:
Add warning when no output file selected in the Merge tool in fTools. Fix #3210


Modified: trunk/qgis/python/plugins/fTools/tools/doMergeShapes.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doMergeShapes.py	2010-11-14 01:09:55 UTC (rev 14633)
+++ trunk/qgis/python/plugins/fTools/tools/doMergeShapes.py	2010-11-14 09:56:52 UTC (rev 14634)
@@ -18,6 +18,7 @@
 
     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 @@
 
       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 ):



More information about the QGIS-commit mailing list