From 53e29673eec48330ceec836e64a578cac31199f1 Mon Sep 17 00:00:00 2001 From: MultiplyByZer0 Date: Tue, 14 Mar 2017 02:53:17 -0400 Subject: [PATCH] Allow reload confirmation to be disabled If the user has disabled confirmation for closing, disable confirmation for reloading as well. --- src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index 471aefe2c..8efd1cbec 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -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(); }