diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-24 18:57:35 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-24 18:57:35 -0800 |
commit | db2b19b8f0d452d682d53c7ed0ff6e359b46efa0 (patch) | |
tree | 2519881fb1ec30cf148cd91180228f3214fec49e /altosui/AltosSiteMap.java | |
parent | b372f3c0ee4ec49aabe61c169cb1eb9bb4fb2cfc (diff) | |
parent | 915f881d61294dc6f5a6a3e8d75567e18492a631 (diff) |
Merge remote branch 'aj/buttonbox' into buttonbox
Diffstat (limited to 'altosui/AltosSiteMap.java')
-rw-r--r-- | altosui/AltosSiteMap.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index 80970605..d4a4cbf4 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -230,16 +230,19 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { // if insufficient gps data, nothing to update if (state.gps == null) return; - if (state.pad_lat == 0 && state.pad_lon == 0) + if (!state.gps.locked && state.gps.nsat < 4) return; - if (!state.gps.locked) { - if (state.gps.nsat < 4) - return; - } if (!initialised) { - initMaps(state.pad_lat, state.pad_lon); - initialised = true; + if (state.pad_lat != 0 || state.pad_lon != 0) { + initMaps(state.pad_lat, state.pad_lon); + initialised = true; + } else if (state.gps.lat != 0 || state.gps.lon != 0) { + initMaps(state.gps.lat, state.gps.lon); + initialised = true; + } else { + return; + } } final Point2D.Double pt = pt(state.gps.lat, state.gps.lon); |