private DataPoint[] _points;
/** Altitude strings if present */
private String[] _altitudes;
+ /** Whether all altitudes were overwriten (in which case
+ * _points will have the full track) */
+ boolean overwriteAlt;
/**
* Constructor
* @param inTrackInfo track info object
*/
- public UndoLookupSrtm(TrackInfo inTrackInfo)
+ public UndoLookupSrtm(TrackInfo inTrackInfo, boolean overwriteAlt)
{
Track track = inTrackInfo.getTrack();
int numPoints = track.getNumPoints();
for (int i=0; i<numPoints; i++)
{
DataPoint point = track.getPoint(i);
- if (!point.hasAltitude() || point.getAltitude().getValue() == 0)
+ if (overwriteAlt || !point.hasAltitude() || point.getAltitude().getValue() == 0)
{
_points[i] = point;
if (point.hasAltitude()) {