Fix gpxItem locationOnMap
This commit is contained in:
parent
7525c925ca
commit
a2a7cb77bf
4 changed files with 10 additions and 5 deletions
|
@ -83,7 +83,7 @@ public class TripRecordingBottomSheet extends MenuBottomSheetDialogFragment impl
|
|||
public static final String UPDATE_DYNAMIC_ITEMS = "update_dynamic_items";
|
||||
private static final int GPS_UPDATE_INTERVAL = 1000;
|
||||
public static final GPXTabItemType[] INIT_TAB_ITEMS =
|
||||
new GPXTabItemType[]{GPX_TAB_ITEM_GENERAL, GPX_TAB_ITEM_ALTITUDE, GPX_TAB_ITEM_SPEED};
|
||||
new GPXTabItemType[] {GPX_TAB_ITEM_GENERAL, GPX_TAB_ITEM_ALTITUDE, GPX_TAB_ITEM_SPEED};
|
||||
|
||||
private OsmandApplication app;
|
||||
private OsmandSettings settings;
|
||||
|
@ -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