diff --git a/traitsui/qt/file_editor.py b/traitsui/qt/file_editor.py index 4301d49a8..2f2d55b9f 100644 --- a/traitsui/qt/file_editor.py +++ b/traitsui/qt/file_editor.py @@ -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 diff --git a/traitsui/wx/file_editor.py b/traitsui/wx/file_editor.py index 396a08b34..7ac95a1a6 100644 --- a/traitsui/wx/file_editor.py +++ b/traitsui/wx/file_editor.py @@ -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