From 33c26854a6c19ddb094c1fd5c2f90c6752b542b3 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Thu, 12 Mar 2015 11:33:25 +0100 Subject: [PATCH] Cores/libs list are downloaded every time the windows is opened --- app/src/cc/arduino/ui/InstallerJDialog.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/cc/arduino/ui/InstallerJDialog.java b/app/src/cc/arduino/ui/InstallerJDialog.java index d682f4dff..355b84b8f 100644 --- a/app/src/cc/arduino/ui/InstallerJDialog.java +++ b/app/src/cc/arduino/ui/InstallerJDialog.java @@ -182,14 +182,6 @@ public abstract class InstallerJDialog extends JDialog { } }); - JButton updateButton = new JButton(_("Update list")); - updateButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent arg0) { - onUpdatePressed(); - } - }); - progressBox = Box.createHorizontalBox(); progressBox.add(progressBar); progressBox.add(Box.createHorizontalStrut(5)); @@ -199,7 +191,6 @@ public abstract class InstallerJDialog extends JDialog { updateBox.add(Box.createHorizontalGlue()); updateBox.add(errorMessage); updateBox.add(Box.createHorizontalGlue()); - updateBox.add(updateButton); } { @@ -222,6 +213,13 @@ public abstract class InstallerJDialog extends JDialog { InstallerJDialog.this.dispatchEvent(new WindowEvent(InstallerJDialog.this, WindowEvent.WINDOW_CLOSING)); } }); + + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + onUpdatePressed(); + } + }); } public void setErrorMessage(String message) {