Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f4db343f4e
1 changed files with 11 additions and 9 deletions
|
@ -278,22 +278,24 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
||||||
imageView.setOnClickListener(new View.OnClickListener() {
|
imageView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
WptPt pointToShow = getGpx() != null ? getGpx().findPointToShow() : null;
|
GpxDataItem gpxDataItem = getGpxDataItem();
|
||||||
|
GPXFile gpx = getGpx();
|
||||||
|
WptPt pointToShow = gpx != null ? gpx.findPointToShow() : null;
|
||||||
if (pointToShow != null) {
|
if (pointToShow != null) {
|
||||||
LatLon location = new LatLon(pointToShow.getLatitude(),
|
LatLon location = new LatLon(pointToShow.getLatitude(),
|
||||||
pointToShow.getLongitude());
|
pointToShow.getLongitude());
|
||||||
final OsmandSettings settings = app.getSettings();
|
final OsmandSettings settings = app.getSettings();
|
||||||
String typeName = "";
|
String trackName = "";
|
||||||
if (getGpx().showCurrentTrack) {
|
if (gpx.showCurrentTrack) {
|
||||||
typeName = getString(R.string.shared_string_currently_recording_track);
|
trackName = getString(R.string.shared_string_currently_recording_track);
|
||||||
} else if (getGpxDataItem() != null) {
|
} else if (gpxDataItem != null) {
|
||||||
typeName = getGpxDataItem().getFile().getName();
|
trackName = gpxDataItem.getFile().getName();
|
||||||
} else if (getGpx() != null) {
|
} else {
|
||||||
typeName = getGpx().path;
|
trackName = gpx.path;
|
||||||
}
|
}
|
||||||
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
|
settings.setMapLocationToShow(location.getLatitude(), location.getLongitude(),
|
||||||
settings.getLastKnownMapZoom(),
|
settings.getLastKnownMapZoom(),
|
||||||
new PointDescription(PointDescription.POINT_TYPE_WPT, typeName),
|
new PointDescription(PointDescription.POINT_TYPE_WPT, trackName),
|
||||||
false,
|
false,
|
||||||
getRect()
|
getRect()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue