Mercurial > hg > release > thermostat-1.4
changeset 1770:8e13b9b29f10
Fix looping on setup window closing
Reviewed-by: omajid
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-September/015769.html
PR2581
author | Andrew Azores <aazores@redhat.com> |
---|---|
date | Thu, 03 Sep 2015 17:17:14 -0400 |
parents | 38072c439ed4 |
children | 13123d2a1748 |
files | setup/command/src/main/java/com/redhat/thermostat/setup/command/internal/SetupWindow.java |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/setup/command/src/main/java/com/redhat/thermostat/setup/command/internal/SetupWindow.java Thu Sep 03 15:19:46 2015 +0200 +++ b/setup/command/src/main/java/com/redhat/thermostat/setup/command/internal/SetupWindow.java Thu Sep 03 17:17:14 2015 -0400 @@ -135,7 +135,7 @@ frame.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { - shutdown(); + cancelSetup(); } }); mainView = new JPanel(new BorderLayout()); @@ -229,8 +229,7 @@ ActionListener cancelButtonListener = new ActionListener() { @Override public void actionPerformed(ActionEvent actionEvent) { - setupCancelled = true; - shutdown(); + cancelSetup(); } }; startView.getCancelBtn().addActionListener(cancelButtonListener); @@ -281,6 +280,11 @@ mainView.repaint(); } + private void cancelSetup() { + setupCancelled = true; + shutdown(); + } + private void shutdown() { shutdown.countDown(); }