Fix gpxItem locationOnMap
This commit is contained in:
parent
7525c925ca
commit
a2a7cb77bf
4 changed files with 10 additions and 5 deletions
|
@ -651,7 +651,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
|
|||
}
|
||||
|
||||
@Override
|
||||
public void openAnalyzeOnMap(GpxDisplayItem gpxItem) {
|
||||
public void openAnalyzeOnMap(@NonNull GpxDisplayItem gpxItem) {
|
||||
}
|
||||
|
||||
public interface DismissTargetFragment {
|
||||
|
|
|
@ -2,6 +2,8 @@ package net.osmand.plus.myplaces;
|
|||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import net.osmand.GPXUtilities.TrkSegment;
|
||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||
|
||||
|
@ -19,5 +21,5 @@ public interface SegmentActionsListener {
|
|||
|
||||
void showOptionsPopupMenu(View view, TrkSegment trkSegment, boolean confirmDeletion, GpxDisplayItem gpxItem);
|
||||
|
||||
void openAnalyzeOnMap(GpxDisplayItem gpxItem);
|
||||
void openAnalyzeOnMap(@NonNull GpxDisplayItem gpxItem);
|
||||
}
|
||||
|
|
|
@ -292,7 +292,7 @@ public class TrackSegmentFragment extends OsmAndListFragment implements TrackBit
|
|||
}
|
||||
|
||||
@Override
|
||||
public void openAnalyzeOnMap(GpxDisplayItem gpxItem) {
|
||||
public void openAnalyzeOnMap(@NonNull GpxDisplayItem gpxItem) {
|
||||
OsmandSettings settings = app.getSettings();
|
||||
settings.setMapLocationToShow(gpxItem.locationOnMap.lat, gpxItem.locationOnMap.lon,
|
||||
settings.getLastKnownMapZoom(),
|
||||
|
|
|
@ -1131,7 +1131,10 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
|||
}
|
||||
|
||||
@Override
|
||||
public void openAnalyzeOnMap(GpxDisplayItem gpxItem) {
|
||||
public void openAnalyzeOnMap(@NonNull GpxDisplayItem gpxItem) {
|
||||
if (gpxPoint != null) {
|
||||
gpxItem.locationOnMap = gpxPoint.getSelectedPoint();
|
||||
}
|
||||
TrackDetailsMenu trackDetailsMenu = getMapActivity().getTrackDetailsMenu();
|
||||
trackDetailsMenu.setGpxItem(gpxItem);
|
||||
trackDetailsMenu.setSelectedGpxFile(selectedGpxFile);
|
||||
|
|
Loading…
Reference in a new issue