diff --git a/src/system_main/ViewBuilder.java b/src/system_main/ViewBuilder.java index c9c621a..30b0750 100644 --- a/src/system_main/ViewBuilder.java +++ b/src/system_main/ViewBuilder.java @@ -581,6 +581,11 @@ public void actionPerformed(ActionEvent e) { String abs_path = export_dialog.get_path(FileDialog.SAVE); + //enforce the extension + if (!abs_path.endsWith(".HALiteELEMS")) { + abs_path += ".HALiteELEMS"; + } + if ((abs_path != null) && !window.get_datastore().export_element_choices(abs_path)) { new ErrorDialog("Export Error", "Unable to export element choices").show_dialog(); } diff --git a/src/system_utils/io_tools/SystemFileDialog.java b/src/system_utils/io_tools/SystemFileDialog.java index 0bf8419..660340b 100644 --- a/src/system_utils/io_tools/SystemFileDialog.java +++ b/src/system_utils/io_tools/SystemFileDialog.java @@ -86,6 +86,7 @@ public boolean export_on_path(Backend databackend, int type) { public String get_path(int mode) { + system_file_dialog.setFile("Untitled" + this.ext_type); system_file_dialog.setMode(mode); system_file_dialog.setVisible(true);