mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
add user option for file overwriting
This commit is contained in:
parent
c0b6bfe08f
commit
3ffa64d687
@ -290,7 +290,7 @@ public class EditorDockable extends DefaultSingleCDockable {
|
||||
}
|
||||
file = new File(fileName);
|
||||
if (file.exists()) {
|
||||
int overwrite = JOptionPane.showConfirmDialog(null, "File exists! Overwrite it?");
|
||||
int overwrite = JOptionPane.showConfirmDialog(null, "File exists! Overwrite it?", "Confirm", JOptionPane.YES_NO_OPTION);
|
||||
if (overwrite == JOptionPane.NO_OPTION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3166,7 +3166,7 @@ public class FrmMain extends JFrame implements IApplication {
|
||||
}
|
||||
|
||||
if (new File(fileName).exists()) {
|
||||
int overwrite = JOptionPane.showConfirmDialog(this, "File exists! Overwrite it?");
|
||||
int overwrite = JOptionPane.showConfirmDialog(this, "File exists! Overwrite it?", "Confirm", JOptionPane.YES_NO_OPTION);
|
||||
if (overwrite == JOptionPane.NO_OPTION) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user