Allow reload confirmation to be disabled

If the user has disabled confirmation for closing, disable confirmation for reloading as well.
This commit is contained in:
MultiplyByZer0
2017-03-14 02:53:17 -04:00
parent 3e99d19a1d
commit 53e29673ee

View File

@@ -533,7 +533,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
protected boolean reloadActionPerformed(ActionEvent evt) {
if (swf != null) {
if (View.showConfirmDialog(null, translate("message.confirm.reload"), translate("message.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
if (!Configuration.showCloseConfirmation.get() || View.showConfirmDialog(null, translate("message.confirm.reload"), translate("message.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
Main.reloadFile(swf.swfList);
}
}
@@ -542,7 +542,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
protected boolean reloadAllActionPerformed(ActionEvent evt) {
if (swf != null) {
if (View.showConfirmDialog(null, translate("message.confirm.reloadAll"), translate("message.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
if (!Configuration.showCloseConfirmation.get() || View.showConfirmDialog(null, translate("message.confirm.reloadAll"), translate("message.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
Main.reloadApp();
}