Skip to content

Commit

Permalink
fix: Use save-dialog instead of open-dialog for config save as
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Jul 26, 2023
1 parent 8ef7ee2 commit 051a6e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class SaveConfigAsItem(
*/
private fun saveAs() {
val configChooser = ConfigChooser(apiProperties, Gui.menubar_gui_menuitem_saveas_title.toString())
if (configChooser.showOpenDialog(mainFrame) == JFileChooser.APPROVE_OPTION) {
configChooser.dialogType = JFileChooser.SAVE_DIALOG
if (configChooser.showSaveDialog(mainFrame) == JFileChooser.APPROVE_OPTION) {
if (configChooser.selectedFile.path.endsWith(".conf")) {
tabbedConfigsTab.selectedEditor!!.getCurrentConfiguration().save(
configChooser.selectedFile.absoluteFile
Expand Down

0 comments on commit 051a6e9

Please sign in to comment.