Skip to content

Commit

Permalink
Fix file selector dialog (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-w authored Jan 17, 2021
1 parent fe93b36 commit 9af1eb5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/vorta/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ def get_dict_from_list(dataDict, mapList):


def choose_file_dialog(parent, title, want_folder=True):
options = QFileDialog.Options()
if want_folder:
options |= QFileDialog.ShowDirsOnly
dialog = QFileDialog(parent, title, os.path.expanduser('~'), options=options)
dialog = QFileDialog(parent, title, os.path.expanduser('~'))
dialog.setFileMode(QFileDialog.Directory if want_folder else QFileDialog.ExistingFiles)
dialog.setParent(parent, QtCore.Qt.Sheet)
if want_folder:
dialog.setOption(QFileDialog.ShowDirsOnly)
return dialog


Expand Down

0 comments on commit 9af1eb5

Please sign in to comment.