Skip to content

Commit

Permalink
use QFileDialog.getOpenFileNameAndFilter variant when setting last fi…
Browse files Browse the repository at this point in the history
…lter (fixes #8138)
  • Loading branch information
jef-n committed Jun 29, 2013
1 parent 0ebf28a commit 49e5c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -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 )

Expand Down

0 comments on commit 49e5c8f

Please sign in to comment.