Skip to content

Commit

Permalink
Fix logic for selecting action in file dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
greschd committed Apr 6, 2023
1 parent 3a6fb75 commit f83cd39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion traitsui/qt/file_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _create_file_dialog(self):
dlg = FileDialog(
parent=self.get_control_widget(),
default_path=self._file_name.text(),
action="save" if self.factory.dialog_style == "save as" else "open",
action="save as" if self.factory.dialog_style == "save" else "open",
wildcard=wildcard,
)
return dlg
Expand Down
2 changes: 1 addition & 1 deletion traitsui/wx/file_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _create_file_dialog(self):
dlg = FileDialog(
parent=self.get_control_widget(),
default_path=self._file_name.GetValue(),
action="save" if self.factory.dialog_style == "save as" else "open",
action="save as" if self.factory.dialog_style == "save" else "open",
wildcard=wildcard,
)
return dlg
Expand Down

0 comments on commit f83cd39

Please sign in to comment.