altosui: always display romconfig ui while flashing
authorKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 11:01:47 +0000 (04:01 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 24 Aug 2010 11:01:47 +0000 (04:01 -0700)
ao-tools/altosui/AltosFlashUI.java

index b88a16b..73a97a6 100644 (file)
@@ -72,14 +72,15 @@ public class AltosFlashUI
                flash.addActionListener(this);
                try {
                        flash.open();
-                       if (!flash.check_rom_config()) {
-                               AltosRomconfigUI romconfig_ui = new AltosRomconfigUI (frame);
-                               romconfig_ui.showDialog();
-                               AltosRomconfig romconfig = romconfig_ui.romconfig();
-                               if (romconfig == null)
-                                       return;
-                               flash.set_romconfig(romconfig);
-                       }
+                       AltosRomconfigUI romconfig_ui = new AltosRomconfigUI (frame);
+
+                       romconfig_ui.set(flash.romconfig());
+                       romconfig_ui.showDialog();
+
+                       AltosRomconfig romconfig = romconfig_ui.romconfig();
+                       if (romconfig == null || !romconfig.valid())
+                               return;
+                       flash.set_romconfig(romconfig);
                        serial_value.setText(String.format("%d",
                                                           flash.romconfig().serial_number));
                        file_value.setText(file.toString());