Show modal when attempting to close EvA with CMD+Q or via menu.
This commit is contained in:
parent
cb5bedd263
commit
3cdb25b393
@ -669,7 +669,14 @@ public class Main extends JFrame implements OptimizationStateListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent event) {
|
public void actionPerformed(final ActionEvent event) {
|
||||||
Main.this.close();
|
int result = JOptionPane.showConfirmDialog(
|
||||||
|
Main.this,
|
||||||
|
"Do you really want to exit EvA2?",
|
||||||
|
"Exit Application",
|
||||||
|
JOptionPane.YES_NO_OPTION);
|
||||||
|
if (result == JOptionPane.YES_OPTION) {
|
||||||
|
Main.this.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user