You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2020/12/19 15:41:13 UTC

[jmeter] branch master updated: Reinstate the restart after LAF change

This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 39626d0  Reinstate the restart after LAF change
39626d0 is described below

commit 39626d03fed0375ab1c81e5fad4e000ebe11db2f
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sat Dec 19 16:41:00 2020 +0100

    Reinstate the restart after LAF change
---
 .../java/org/apache/jmeter/gui/action/LookAndFeelCommand.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
index 68221ee..864a3e5 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.prefs.Preferences;
 
+import javax.swing.JOptionPane;
 import javax.swing.UIManager;
 
 import org.apache.jmeter.gui.GuiPackage;
@@ -224,6 +225,13 @@ public class LookAndFeelCommand extends AbstractAction {
     public void doAction(ActionEvent ev) {
         try {
             activateLookAndFeel(ev.getActionCommand());
+            int chosenOption = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils
+                    .getResString("laf_quit_after_change"), // $NON-NLS-1$
+                    JMeterUtils.getResString("exit"), // $NON-NLS-1$
+                    JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+            if (chosenOption == JOptionPane.YES_OPTION) {
+                ActionRouter.getInstance().doActionNow(new ActionEvent(ev.getSource(), ev.getID(), ActionNames.RESTART));
+            }
         } catch (IllegalArgumentException e) {
             JMeterUtils.reportErrorToUser(e.getMessage(), e);
         }