altosui: Only 'show' config dialog once
authorKeith Packard <keithp@keithp.com>
Tue, 23 Aug 2011 06:33:52 +0000 (23:33 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 23 Aug 2011 06:33:52 +0000 (23:33 -0700)
Otherwise, the dialog jumps back to the initial position each time the
data is updated.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosConfig.java

index 7cd8cb8b91f51e788a380f5126145a978864621f..45521665236d1f461b4e4a9886c802d861419be0 100644 (file)
@@ -85,6 +85,7 @@ public class AltosConfig implements ActionListener {
        string_ref      callsign;
        AltosConfigUI   config_ui;
        boolean         serial_started;
+       boolean         made_visible;
 
        boolean get_int(String line, String label, int_ref x) {
                if (line.startsWith(label)) {
@@ -166,7 +167,10 @@ public class AltosConfig implements ActionListener {
                config_ui.set_pad_orientation(pad_orientation.get());
                config_ui.set_callsign(callsign.get());
                config_ui.set_clean();
-               config_ui.make_visible();
+               if (!made_visible) {
+                       made_visible = true;
+                       config_ui.make_visible();
+               }
        }
 
        void process_line(String line) {