Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-03-11 21:07:55 +01:00
commit 25512240e0

View file

@ -287,33 +287,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
updateColorView(colorView); 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); updateColorView(colorView);
colorView.setOnClickListener(new View.OnClickListener() { colorView.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -397,6 +370,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
divider.setVisibility(View.GONE); divider.setVisibility(View.GONE);
} }
if (rotatedTileBox == null || mapBitmap == null) {
QuadRect rect = getRect(); QuadRect rect = getRect();
if (rect.left != 0 && rect.top != 0) { if (rect.left != 0 && rect.top != 0) {
double clat = rect.bottom / 2 + rect.top / 2; double clat = rect.bottom / 2 + rect.top / 2;
@ -453,6 +427,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
imageView.setVisibility(View.GONE); imageView.setVisibility(View.GONE);
} }
} }
}
private void drawTrack(Canvas canvas, RotatedTileBox tileBox, SelectedGpxFile g, DrawSettings settings) { private void drawTrack(Canvas canvas, RotatedTileBox tileBox, SelectedGpxFile g, DrawSettings settings) {
GpxDataItem gpxDataItem = null; GpxDataItem gpxDataItem = null;