altosui: Fix the 'Graph' button on the landed tab
authorKeith Packard <keithp@keithp.com>
Fri, 11 Jul 2014 00:26:19 +0000 (17:26 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 11 Jul 2014 00:35:44 +0000 (17:35 -0700)
It hasn't been getting enabled since the state tabs were rewritten.

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

index 50c1ea31fe9e3105b8134fdd8ba1d01404f71084..7c50adacba874d053c892e913277dc71330083d0 100644 (file)
@@ -151,6 +151,12 @@ public class AltosLanded extends AltosUIFlightTab implements ActionListener {
                return "Landed";
        }
 
                return "Landed";
        }
 
+       public void show(AltosState state, AltosListenerState listener_state) {
+               super.show(state, listener_state);
+               if (reader.backing_file() != null)
+                       graph.setEnabled(true);
+       }
+
        public AltosLanded(AltosFlightReader in_reader) {
                reader = in_reader;
 
        public AltosLanded(AltosFlightReader in_reader) {
                reader = in_reader;