summaryrefslogtreecommitdiff
path: root/altosui/AltosConfigUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-08-20 11:19:57 -0700
committerKeith Packard <keithp@keithp.com>2011-08-20 11:23:49 -0700
commit67f28c58db0deca8f8050d33e97ad96017f4baaa (patch)
treeb684fc41b234fd19a6457f1bb0741578df273f54 /altosui/AltosConfigUI.java
parentfcff63baf8fde1174571a2c7c860099e19dbf629 (diff)
altosui: Disable 'max flight log' config when there are stored flights
When flights are stored in flash, the maximum flight log value cannot be changed as the flight data might need to be moved around in memory. Check for this case by looking for stored flights and disabling the combo box when storage is not empty. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosConfigUI.java')
-rw-r--r--altosui/AltosConfigUI.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/altosui/AltosConfigUI.java b/altosui/AltosConfigUI.java
index 63e0ba78..69afd691 100644
--- a/altosui/AltosConfigUI.java
+++ b/altosui/AltosConfigUI.java
@@ -573,6 +573,10 @@ public class AltosConfigUI
flight_log_max_value.setSelectedItem(Integer.toString(new_flight_log_max));
}
+ public void set_flight_log_max_enabled(boolean enable) {
+ flight_log_max_value.setEnabled(enable);
+ }
+
public int flight_log_max() {
return Integer.parseInt(flight_log_max_value.getSelectedItem().toString());
}