summaryrefslogtreecommitdiff
path: root/altosui/AltosConfigPyroUI.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-09-03 22:59:09 -0700
committerKeith Packard <keithp@keithp.com>2014-09-03 22:59:09 -0700
commit2b03aca995b0151d7e820775f6a9d4afec462633 (patch)
tree446cbbac16cad483e68d7789944a5c4dd5c89641 /altosui/AltosConfigPyroUI.java
parentbe38fb88d11bda1ba1caca38220773d3abcede19 (diff)
altosui: Don't mark altimeter dirty when opening pyro panel
Skip setting the UI dirty when filling in the pyro firing time value. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosConfigPyroUI.java')
-rw-r--r--altosui/AltosConfigPyroUI.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java
index dd4fb505..64336c8e 100644
--- a/altosui/AltosConfigPyroUI.java
+++ b/altosui/AltosConfigPyroUI.java
@@ -285,9 +285,13 @@ public class AltosConfigPyroUI
"0.050", "0.100", "0.250", "0.500", "1.0", "2.0"
};
+ boolean initializing;
+
public void set_pyro_firing_time(double new_pyro_firing_time) {
+ initializing = true;
pyro_firing_time_value.setSelectedItem(Double.toString(new_pyro_firing_time));
pyro_firing_time_value.setEnabled(new_pyro_firing_time >= 0);
+ initializing = false;
}
public double get_pyro_firing_time() throws AltosConfigDataException {
@@ -301,23 +305,28 @@ public class AltosConfigPyroUI
}
public void set_dirty() {
- owner.set_dirty();
+ if (!initializing)
+ owner.set_dirty();
}
public void itemStateChanged(ItemEvent e) {
- owner.set_dirty();
+ if (!initializing)
+ owner.set_dirty();
}
public void changedUpdate(DocumentEvent e) {
- owner.set_dirty();
+ if (!initializing)
+ owner.set_dirty();
}
public void insertUpdate(DocumentEvent e) {
- owner.set_dirty();
+ if (!initializing)
+ owner.set_dirty();
}
public void removeUpdate(DocumentEvent e) {
- owner.set_dirty();
+ if (!initializing)
+ owner.set_dirty();
}
public void units_changed(boolean imperial_units) {