Fixes track info
This commit is contained in:
parent
5ef93d4a2f
commit
b77dc02ab1
1 changed files with 46 additions and 71 deletions
|
@ -287,33 +287,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
updateColorView(colorView);
|
||||
}
|
||||
});
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), vis.isChecked(), false);
|
||||
if (vis.isChecked() && sf.getGpxFile() != null) {
|
||||
final List<GpxDisplayGroup> groups = getOriginalGroups();
|
||||
if (groups.size() > 0 && groups.get(0).getModifiableList().size() > 0) {
|
||||
GpxDisplayItem item = groups.get(0).getModifiableList().get(0);
|
||||
app.getSettings().setMapLocationToShow(item.locationStart.lat, item.locationStart.lon,
|
||||
15,
|
||||
new PointDescription(PointDescription.POINT_TYPE_GPX_ITEM, item.group.getGpxName()),
|
||||
false,
|
||||
item);
|
||||
} else {
|
||||
WptPt wpt = sf.getGpxFile().findPointToShow();
|
||||
if (wpt != null) {
|
||||
app.getSettings().setMapLocationToShow(wpt.getLatitude(), wpt.getLongitude(),
|
||||
15,
|
||||
new PointDescription(PointDescription.POINT_TYPE_WPT, wpt.name),
|
||||
false,
|
||||
wpt);
|
||||
}
|
||||
}
|
||||
MapActivity.launchMapActivityMoveToTop(getMyActivity());
|
||||
}
|
||||
}
|
||||
});
|
||||
updateColorView(colorView);
|
||||
colorView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -397,6 +370,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
divider.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (rotatedTileBox == null || mapBitmap == null) {
|
||||
QuadRect rect = getRect();
|
||||
if (rect.left != 0 && rect.top != 0) {
|
||||
double clat = rect.bottom / 2 + rect.top / 2;
|
||||
|
@ -453,6 +427,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
imageView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void drawTrack(Canvas canvas, RotatedTileBox tileBox, SelectedGpxFile g, DrawSettings settings) {
|
||||
GpxDataItem gpxDataItem = null;
|
||||
|
|
Loading…
Reference in a new issue