Skip to content

Commit

Permalink
[dbmanager] avoid double extension when exports to file a table
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Aug 2, 2013
1 parent 3644402 commit 65f9ec7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_export_vector.py
Expand Up @@ -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())
Expand Down

0 comments on commit 65f9ec7

Please sign in to comment.