Skip to content
Permalink
Browse files
[dbmanager] avoid double extension when exports to file a table
  • Loading branch information
slarosa committed Aug 2, 2013
1 parent 3644402 commit 65f9ec72012992299a980291059c2bc4ba8c5413
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/dlg_export_vector.py
@@ -64,12 +64,12 @@ def checkSupports(self):
def chooseOutputFile(self):
# get last used dir and format
settings = QSettings()
lastDir = settings.value("/db_manager/lastUsedDir", "")
lastDir = settings.value("/db_manager/lastUsedDir", "")
# ask for a filename
filename = QFileDialog.getSaveFileName(self, self.tr("Choose where to save the file"), lastDir, self.tr("Shapefiles") + " (*.shp)")
if filename == "":
return
if filename[:-4] != ".shp":
if filename[-4:] != ".shp":
filename += ".shp"
# store the last used dir and format
settings.setValue("/db_manager/lastUsedDir", QFileInfo(filename).filePath())

0 comments on commit 65f9ec7

Please sign in to comment.