Skip to content
Permalink
Browse files

use QFileDialog.getOpenFileNameAndFilter variant when setting last fi…

…lter (fixes #8138)
  • Loading branch information
jef-n committed Jun 29, 2013
1 parent 0ebf28a commit 49e5c8f89bb49f3c492ea8c3ea2e4f7bfe1e9dfc
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/plugins/db_manager/dlg_import_vector.py
@@ -125,12 +125,12 @@ def chooseInputFile(self):
lastDir = settings.value("/db_manager/lastUsedDir", "")
lastVectorFormat = settings.value("/UI/lastVectorFileFilter", "")
# ask for a filename
filename = QFileDialog.getOpenFileName(self, self.tr("Choose the file to import"), lastDir, vectorFormats, lastVectorFormat)
(filename, lastVectorFormat) = QFileDialog.getOpenFileNameAndFilter(self, self.tr("Choose the file to import"), lastDir, vectorFormats, lastVectorFormat)
if filename == "":
return
# store the last used dir and format
settings.setValue("/db_manager/lastUsedDir", QFileInfo(filename).filePath())
#settings.setValue("/UI/lastVectorFileFilter", lastVectorFormat)
settings.setValue("/UI/lastVectorFileFilter", lastVectorFormat)

self.cboInputLayer.setEditText( filename )

0 comments on commit 49e5c8f

Please sign in to comment.
You can’t perform that action at this time.