Skip to content

Commit

Permalink
Fix bug with save window
Browse files Browse the repository at this point in the history
  • Loading branch information
UmSenhorQualquer committed Apr 5, 2019
1 parent c122495 commit 60146fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyforms_gui/basewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ def save_window(self):
self.save_form(data)

filename, _ = QFileDialog.getSaveFileName(self, 'Select file')
with open(filename, 'w') as output_file: json.dump(data, output_file)
if filename:
with open(filename, 'w') as output_file:
json.dump(data, output_file)

def load_form_filename(self, filename):
with open(filename, 'r') as pkl_file:
Expand Down

0 comments on commit 60146fe

Please sign in to comment.