Skip to content

Commit

Permalink
cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
cubewhy committed Jan 1, 2024
1 parent c1a4d46 commit f9c4f32
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/cubewhy/celestial/utils/GuiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ private GuiUtils() {
public static @Nullable File chooseFile(FileFilter filter) {
JFileChooser fileDialog = new JFileChooser();
fileDialog.addChoosableFileFilter(filter);
fileDialog.showDialog(Celestial.launcherFrame, null);
return fileDialog.getSelectedFile();
return (fileDialog.showOpenDialog(Celestial.launcherFrame) == JFileChooser.APPROVE_OPTION) ? null : fileDialog.getSelectedFile();
}
}

0 comments on commit f9c4f32

Please sign in to comment.