diff options
| author | Keith Packard <keithp@keithp.com> | 2010-08-24 03:59:09 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-08-24 03:59:09 -0700 |
| commit | d93787284c8e514a929edb9f944c98ae0206a33f (patch) | |
| tree | d87d4df53ad2f3515b1d4830c98cc2011b7e23d9 /ao-tools/altosui/AltosFlashUI.java | |
| parent | 7d44cbd621d2b113ac2b802ef17e3d8a660ce7f2 (diff) | |
altosui: Delay mapping Flash UI until flashing actually starts
The flash operation may be abandoned before it even starts; this makes
sure the UI doesn't flash up on the screen.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosFlashUI.java')
| -rw-r--r-- | ao-tools/altosui/AltosFlashUI.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ao-tools/altosui/AltosFlashUI.java b/ao-tools/altosui/AltosFlashUI.java index 0c2041e3..b88a16b3 100644 --- a/ao-tools/altosui/AltosFlashUI.java +++ b/ao-tools/altosui/AltosFlashUI.java @@ -57,8 +57,10 @@ public class AltosFlashUI } else { String cmd = e.getActionCommand(); if (cmd.equals("done")) - dispose(); - else { + ; + else if (cmd.equals("start")) { + setVisible(true); + } else { pbar.setValue(e.getID()); pbar.setString(cmd); } @@ -88,15 +90,14 @@ public class AltosFlashUI "Cannot open image", file.toString(), JOptionPane.ERROR_MESSAGE); - return; } catch (IOException e) { JOptionPane.showMessageDialog(frame, e.getMessage(), file.toString(), JOptionPane.ERROR_MESSAGE); - return; } catch (InterruptedException ie) { } + dispose(); } public void abort() { |
