[DBmanager] add extension to file when exporting (fix #13733)

This commit is contained in:
Alexander Bruy 2016-01-15 17:40:53 +02:00
parent 62d079c6dc
commit e20cfc043c

View File

@ -79,6 +79,13 @@ class DlgExportVector(QDialog, Ui_Dialog):
if filename == "":
return
filterString = qgis.core.QgsVectorFileWriter.filterForDriver(selectedFilter)
ext = filterString[filterString.find('.'):]
ext = ext[:ext.find(' ')]
if not filename.lower().endswith(ext):
filename += ext
# store the last used dir
settings.setValue(self.lastUsedVectorDirSettingsKey, QFileInfo(filename).filePath())