fix changing track info after enabling the "Join segments" option;
fix display track info with enabled/disabled "Join segments" option in chart;
This commit is contained in:
parent
fee1b8983e
commit
0c0d90d42c
4 changed files with 83 additions and 71 deletions
|
@ -36,6 +36,7 @@ import net.osmand.data.LatLon;
|
||||||
import net.osmand.data.QuadRect;
|
import net.osmand.data.QuadRect;
|
||||||
import net.osmand.data.RotatedTileBox;
|
import net.osmand.data.RotatedTileBox;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||||
|
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
|
@ -66,6 +67,8 @@ public class TrackDetailsMenu {
|
||||||
@Nullable
|
@Nullable
|
||||||
private GpxDisplayItem gpxItem;
|
private GpxDisplayItem gpxItem;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
private SelectedGpxFile selectedGpxFile;
|
||||||
|
@Nullable
|
||||||
private TrackDetailsBarController toolbarController;
|
private TrackDetailsBarController toolbarController;
|
||||||
@Nullable
|
@Nullable
|
||||||
private TrkSegment segment;
|
private TrkSegment segment;
|
||||||
|
@ -101,6 +104,15 @@ public class TrackDetailsMenu {
|
||||||
this.gpxItem = gpxItem;
|
this.gpxItem = gpxItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public SelectedGpxFile getSelectedGpxFile() {
|
||||||
|
return selectedGpxFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedGpxFile(@NonNull SelectedGpxFile selectedGpxFile) {
|
||||||
|
this.selectedGpxFile = selectedGpxFile;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isVisible() {
|
public boolean isVisible() {
|
||||||
return visible;
|
return visible;
|
||||||
}
|
}
|
||||||
|
@ -539,7 +551,7 @@ public class TrackDetailsMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldShowXAxisPoints () {
|
public boolean shouldShowXAxisPoints() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,18 +719,19 @@ public class TrackDetailsMenu {
|
||||||
if (gpxItem.chartTypes != null && gpxItem.chartTypes.length > 0) {
|
if (gpxItem.chartTypes != null && gpxItem.chartTypes.length > 0) {
|
||||||
for (int i = 0; i < gpxItem.chartTypes.length; i++) {
|
for (int i = 0; i < gpxItem.chartTypes.length; i++) {
|
||||||
OrderedLineDataSet dataSet = null;
|
OrderedLineDataSet dataSet = null;
|
||||||
|
boolean withoutGaps = selectedGpxFile != null && (!selectedGpxFile.isJoinSegments() && gpxItem.isGeneralTrack());
|
||||||
switch (gpxItem.chartTypes[i]) {
|
switch (gpxItem.chartTypes[i]) {
|
||||||
case ALTITUDE:
|
case ALTITUDE:
|
||||||
dataSet = GpxUiHelper.createGPXElevationDataSet(app, chart, analysis,
|
dataSet = GpxUiHelper.createGPXElevationDataSet(app, chart, analysis,
|
||||||
gpxItem.chartAxisType, false, true, false);
|
gpxItem.chartAxisType, false, true, withoutGaps);
|
||||||
break;
|
break;
|
||||||
case SPEED:
|
case SPEED:
|
||||||
dataSet = GpxUiHelper.createGPXSpeedDataSet(app, chart, analysis,
|
dataSet = GpxUiHelper.createGPXSpeedDataSet(app, chart, analysis,
|
||||||
gpxItem.chartAxisType, gpxItem.chartTypes.length > 1, true, false);
|
gpxItem.chartAxisType, gpxItem.chartTypes.length > 1, true, withoutGaps);
|
||||||
break;
|
break;
|
||||||
case SLOPE:
|
case SLOPE:
|
||||||
dataSet = GpxUiHelper.createGPXSlopeDataSet(app, chart, analysis,
|
dataSet = GpxUiHelper.createGPXSlopeDataSet(app, chart, analysis,
|
||||||
gpxItem.chartAxisType, null, gpxItem.chartTypes.length > 1, true, false);
|
gpxItem.chartAxisType, null, gpxItem.chartTypes.length > 1, true, withoutGaps);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (dataSet != null) {
|
if (dataSet != null) {
|
||||||
|
|
|
@ -17,16 +17,16 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
|
import net.osmand.GPXUtilities.GPXFile;
|
||||||
import net.osmand.GPXUtilities.GPXTrackAnalysis;
|
import net.osmand.GPXUtilities.GPXTrackAnalysis;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayGroup;
|
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItem;
|
||||||
import net.osmand.plus.GpxSelectionHelper.GpxDisplayItemType;
|
|
||||||
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
import net.osmand.plus.GpxSelectionHelper.SelectedGpxFile;
|
||||||
import net.osmand.plus.OsmAndFormatter;
|
import net.osmand.plus.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||||
|
import net.osmand.plus.helpers.GpxUiHelper;
|
||||||
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType;
|
import net.osmand.plus.helpers.GpxUiHelper.GPXDataSetType;
|
||||||
import net.osmand.plus.myplaces.SegmentActionsListener;
|
import net.osmand.plus.myplaces.SegmentActionsListener;
|
||||||
import net.osmand.plus.widgets.TextViewEx;
|
import net.osmand.plus.widgets.TextViewEx;
|
||||||
|
@ -40,51 +40,60 @@ public class GpxBlockStatisticsBuilder {
|
||||||
private final OsmandApplication app;
|
private final OsmandApplication app;
|
||||||
private RecyclerView blocksView;
|
private RecyclerView blocksView;
|
||||||
private final SelectedGpxFile selectedGpxFile;
|
private final SelectedGpxFile selectedGpxFile;
|
||||||
private final TrackDisplayHelper displayHelper;
|
|
||||||
private final GpxDisplayItemType[] filterTypes = {GpxDisplayItemType.TRACK_SEGMENT};
|
|
||||||
|
|
||||||
public GpxBlockStatisticsBuilder(OsmandApplication app, SelectedGpxFile selectedGpxFile, TrackDisplayHelper displayHelper) {
|
public GpxBlockStatisticsBuilder(OsmandApplication app, SelectedGpxFile selectedGpxFile) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.selectedGpxFile = selectedGpxFile;
|
this.selectedGpxFile = selectedGpxFile;
|
||||||
this.displayHelper = displayHelper;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBlocksView(RecyclerView blocksView) {
|
public void setBlocksView(RecyclerView blocksView) {
|
||||||
this.blocksView = blocksView;
|
this.blocksView = blocksView;
|
||||||
}
|
}
|
||||||
|
|
||||||
private GPXTrackAnalysis getAnalysis() {
|
private GpxDisplayItem getDisplayItem(GPXFile gpxFile) {
|
||||||
return selectedGpxFile.getTrackAnalysis(app);
|
return GpxUiHelper.makeGpxDisplayItem(app, gpxFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
private GPXFile getGPXFile() {
|
||||||
|
return selectedGpxFile.getGpxFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initStatBlocks(SegmentActionsListener actionsListener, @ColorInt int activeColor, boolean nightMode) {
|
public void initStatBlocks(SegmentActionsListener actionsListener, @ColorInt int activeColor, boolean nightMode) {
|
||||||
GPXTrackAnalysis analysis = getAnalysis();
|
|
||||||
float totalDistance = analysis.totalDistance;
|
|
||||||
float timeSpan = analysis.timeSpan;
|
|
||||||
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
|
|
||||||
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
|
|
||||||
String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
|
|
||||||
String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
|
|
||||||
List<StatBlock> items = new ArrayList<>();
|
List<StatBlock> items = new ArrayList<>();
|
||||||
|
GPXFile gpxFile = getGPXFile();
|
||||||
|
GpxDisplayItem gpxDisplayItem = null;
|
||||||
|
GPXTrackAnalysis analysis = null;
|
||||||
|
if (gpxFile.tracks.size() > 0) {
|
||||||
|
gpxDisplayItem = getDisplayItem(gpxFile);
|
||||||
|
analysis = gpxDisplayItem.analysis;
|
||||||
|
}
|
||||||
|
if (gpxDisplayItem != null && analysis != null) {
|
||||||
|
boolean withoutGaps = !selectedGpxFile.isJoinSegments() && gpxDisplayItem.isGeneralTrack();
|
||||||
|
float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
|
||||||
|
float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
|
||||||
|
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
|
||||||
|
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
|
||||||
|
String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
|
||||||
|
String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
|
||||||
|
|
||||||
prepareData(analysis, items, app.getString(R.string.distance), OsmAndFormatter.getFormattedDistance(totalDistance, app),
|
prepareData(analysis, items, app.getString(R.string.distance), OsmAndFormatter.getFormattedDistance(totalDistance, app),
|
||||||
R.drawable.ic_action_track_16, R.color.icon_color_default_light, GPXDataSetType.ALTITUDE, GPXDataSetType.SPEED, ItemType.ITEM_DISTANCE);
|
R.drawable.ic_action_track_16, R.color.icon_color_default_light, GPXDataSetType.ALTITUDE, GPXDataSetType.SPEED, ItemType.ITEM_DISTANCE);
|
||||||
prepareData(analysis, items, app.getString(R.string.altitude_ascent), asc,
|
prepareData(analysis, items, app.getString(R.string.altitude_ascent), asc,
|
||||||
R.drawable.ic_action_arrow_up_16, R.color.gpx_chart_red, GPXDataSetType.SLOPE, null, ItemType.ITEM_ALTITUDE);
|
R.drawable.ic_action_arrow_up_16, R.color.gpx_chart_red, GPXDataSetType.SLOPE, null, ItemType.ITEM_ALTITUDE);
|
||||||
prepareData(analysis, items, app.getString(R.string.altitude_descent), desc,
|
prepareData(analysis, items, app.getString(R.string.altitude_descent), desc,
|
||||||
R.drawable.ic_action_arrow_down_16, R.color.gpx_pale_green, GPXDataSetType.ALTITUDE, GPXDataSetType.SLOPE, ItemType.ITEM_ALTITUDE);
|
R.drawable.ic_action_arrow_down_16, R.color.gpx_pale_green, GPXDataSetType.ALTITUDE, GPXDataSetType.SLOPE, ItemType.ITEM_ALTITUDE);
|
||||||
prepareData(analysis, items, app.getString(R.string.average_speed), avg,
|
prepareData(analysis, items, app.getString(R.string.average_speed), avg,
|
||||||
R.drawable.ic_action_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
|
R.drawable.ic_action_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
|
||||||
prepareData(analysis, items, app.getString(R.string.max_speed), max,
|
prepareData(analysis, items, app.getString(R.string.max_speed), max,
|
||||||
R.drawable.ic_action_max_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
|
R.drawable.ic_action_max_speed_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_SPEED);
|
||||||
prepareData(analysis, items, app.getString(R.string.shared_string_time_span),
|
prepareData(analysis, items, app.getString(R.string.shared_string_time_span),
|
||||||
Algorithms.formatDuration((int) (timeSpan / 1000), app.accessibilityEnabled()),
|
Algorithms.formatDuration((int) (timeSpan / 1000), app.accessibilityEnabled()),
|
||||||
R.drawable.ic_action_time_span_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME);
|
R.drawable.ic_action_time_span_16, R.color.icon_color_default_light, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME);
|
||||||
|
}
|
||||||
if (Algorithms.isEmpty(items)) {
|
boolean isNotEmpty = !Algorithms.isEmpty(items);
|
||||||
AndroidUiHelper.updateVisibility(blocksView, false);
|
AndroidUiHelper.updateVisibility(blocksView, isNotEmpty);
|
||||||
} else {
|
if (isNotEmpty && gpxDisplayItem != null) {
|
||||||
final BlockStatisticsAdapter sbAdapter = new BlockStatisticsAdapter(items, actionsListener, activeColor, nightMode);
|
final BlockStatisticsAdapter sbAdapter = new BlockStatisticsAdapter(items, gpxDisplayItem, actionsListener, activeColor, nightMode);
|
||||||
blocksView.setLayoutManager(new LinearLayoutManager(app, LinearLayoutManager.HORIZONTAL, false));
|
blocksView.setLayoutManager(new LinearLayoutManager(app, LinearLayoutManager.HORIZONTAL, false));
|
||||||
blocksView.setAdapter(sbAdapter);
|
blocksView.setAdapter(sbAdapter);
|
||||||
}
|
}
|
||||||
|
@ -134,7 +143,6 @@ public class GpxBlockStatisticsBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StatBlock {
|
public class StatBlock {
|
||||||
|
|
||||||
private final String title;
|
private final String title;
|
||||||
private final String value;
|
private final String value;
|
||||||
private final int imageResId;
|
private final int imageResId;
|
||||||
|
@ -164,14 +172,17 @@ public class GpxBlockStatisticsBuilder {
|
||||||
|
|
||||||
private class BlockStatisticsAdapter extends RecyclerView.Adapter<BlockStatisticsViewHolder> {
|
private class BlockStatisticsAdapter extends RecyclerView.Adapter<BlockStatisticsViewHolder> {
|
||||||
|
|
||||||
|
private final List<StatBlock> statBlocks;
|
||||||
|
private final GpxDisplayItem displayItem;
|
||||||
|
private final SegmentActionsListener actionsListener;
|
||||||
@ColorInt
|
@ColorInt
|
||||||
private final int activeColor;
|
private final int activeColor;
|
||||||
private final List<StatBlock> statBlocks;
|
|
||||||
private final boolean nightMode;
|
private final boolean nightMode;
|
||||||
private final SegmentActionsListener actionsListener;
|
|
||||||
|
|
||||||
public BlockStatisticsAdapter(List<StatBlock> statBlocks, SegmentActionsListener actionsListener, @ColorInt int activeColor, boolean nightMode) {
|
public BlockStatisticsAdapter(List<StatBlock> statBlocks, GpxDisplayItem displayItem,
|
||||||
|
SegmentActionsListener actionsListener, @ColorInt int activeColor, boolean nightMode) {
|
||||||
this.statBlocks = statBlocks;
|
this.statBlocks = statBlocks;
|
||||||
|
this.displayItem = displayItem;
|
||||||
this.actionsListener = actionsListener;
|
this.actionsListener = actionsListener;
|
||||||
this.activeColor = activeColor;
|
this.activeColor = activeColor;
|
||||||
this.nightMode = nightMode;
|
this.nightMode = nightMode;
|
||||||
|
@ -200,32 +211,20 @@ public class GpxBlockStatisticsBuilder {
|
||||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
List<GpxDisplayGroup> groups = displayHelper.getDisplayGroups(filterTypes);
|
GPXTrackAnalysis analysis = displayItem.analysis;
|
||||||
GpxDisplayGroup group = null;
|
if (displayItem != null && analysis != null) {
|
||||||
for (GpxDisplayGroup g : groups) {
|
ArrayList<GPXDataSetType> list = new ArrayList<>();
|
||||||
if (g.isGeneralTrack()) {
|
if (analysis.hasElevationData || analysis.isSpeedSpecified() || analysis.hasSpeedData) {
|
||||||
group = g;
|
if (item.firstType != null) {
|
||||||
}
|
list.add(item.firstType);
|
||||||
}
|
}
|
||||||
if (group == null && !groups.isEmpty()) {
|
if (item.secondType != null) {
|
||||||
group = groups.get(0);
|
list.add(item.secondType);
|
||||||
}
|
|
||||||
if (group != null) {
|
|
||||||
GpxDisplayItem displayItem = group.getModifiableList().get(0);
|
|
||||||
if (displayItem != null && displayItem.analysis != null) {
|
|
||||||
ArrayList<GPXDataSetType> list = new ArrayList<>();
|
|
||||||
if (displayItem.analysis.hasElevationData || displayItem.analysis.isSpeedSpecified() || displayItem.analysis.hasSpeedData) {
|
|
||||||
if (item.firstType != null) {
|
|
||||||
list.add(item.firstType);
|
|
||||||
}
|
|
||||||
if (item.secondType != null) {
|
|
||||||
list.add(item.secondType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
displayItem.chartTypes = list.size() > 0 ? list.toArray(new GPXDataSetType[0]) : null;
|
|
||||||
displayItem.locationOnMap = displayItem.locationStart;
|
|
||||||
actionsListener.openAnalyzeOnMap(displayItem);
|
|
||||||
}
|
}
|
||||||
|
displayItem.chartTypes = list.size() > 0 ? list.toArray(new GPXDataSetType[0]) : null;
|
||||||
|
displayItem.locationOnMap = displayItem.locationStart;
|
||||||
|
actionsListener.openAnalyzeOnMap(displayItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,12 +43,11 @@ public class OverviewCard extends BaseCard {
|
||||||
private final SelectedGpxFile selectedGpxFile;
|
private final SelectedGpxFile selectedGpxFile;
|
||||||
private final GpxBlockStatisticsBuilder blockStatisticsBuilder;
|
private final GpxBlockStatisticsBuilder blockStatisticsBuilder;
|
||||||
|
|
||||||
public OverviewCard(@NonNull MapActivity mapActivity, @NonNull TrackDisplayHelper displayHelper,
|
public OverviewCard(@NonNull MapActivity mapActivity, @NonNull SegmentActionsListener actionsListener, SelectedGpxFile selectedGpxFile) {
|
||||||
@NonNull SegmentActionsListener actionsListener, SelectedGpxFile selectedGpxFile) {
|
|
||||||
super(mapActivity);
|
super(mapActivity);
|
||||||
this.actionsListener = actionsListener;
|
this.actionsListener = actionsListener;
|
||||||
this.selectedGpxFile = selectedGpxFile;
|
this.selectedGpxFile = selectedGpxFile;
|
||||||
blockStatisticsBuilder = new GpxBlockStatisticsBuilder(app, selectedGpxFile, displayHelper);
|
blockStatisticsBuilder = new GpxBlockStatisticsBuilder(app, selectedGpxFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -326,7 +326,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
}
|
}
|
||||||
headerContainer.addView(overviewCard.getView());
|
headerContainer.addView(overviewCard.getView());
|
||||||
} else {
|
} else {
|
||||||
overviewCard = new OverviewCard(getMapActivity(), displayHelper, this, selectedGpxFile);
|
overviewCard = new OverviewCard(getMapActivity(), this, selectedGpxFile);
|
||||||
overviewCard.setListener(this);
|
overviewCard.setListener(this);
|
||||||
headerContainer.addView(overviewCard.build(getMapActivity()));
|
headerContainer.addView(overviewCard.build(getMapActivity()));
|
||||||
}
|
}
|
||||||
|
@ -760,7 +760,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
segment = segments.get(0);
|
segment = segments.get(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GpxDisplayItemType[] filterTypes = new GpxDisplayItemType[] {GpxDisplayItemType.TRACK_SEGMENT};
|
GpxDisplayItemType[] filterTypes = new GpxDisplayItemType[]{GpxDisplayItemType.TRACK_SEGMENT};
|
||||||
List<GpxDisplayItem> items = TrackDisplayHelper.flatten(displayHelper.getOriginalGroups(filterTypes));
|
List<GpxDisplayItem> items = TrackDisplayHelper.flatten(displayHelper.getOriginalGroups(filterTypes));
|
||||||
if (segment != null && !Algorithms.isEmpty(items)) {
|
if (segment != null && !Algorithms.isEmpty(items)) {
|
||||||
SplitSegmentDialogFragment.showInstance(fragmentManager, displayHelper, items.get(0), segment);
|
SplitSegmentDialogFragment.showInstance(fragmentManager, displayHelper, items.get(0), segment);
|
||||||
|
@ -1013,6 +1013,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
public void openAnalyzeOnMap(GpxDisplayItem gpxItem) {
|
public void openAnalyzeOnMap(GpxDisplayItem gpxItem) {
|
||||||
TrackDetailsMenu trackDetailsMenu = getMapActivity().getTrackDetailsMenu();
|
TrackDetailsMenu trackDetailsMenu = getMapActivity().getTrackDetailsMenu();
|
||||||
trackDetailsMenu.setGpxItem(gpxItem);
|
trackDetailsMenu.setGpxItem(gpxItem);
|
||||||
|
trackDetailsMenu.setSelectedGpxFile(selectedGpxFile);
|
||||||
trackDetailsMenu.show();
|
trackDetailsMenu.show();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
@ -1110,7 +1111,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
@Override
|
@Override
|
||||||
public void gpxSavingFinished(Exception errorMessage) {
|
public void gpxSavingFinished(Exception errorMessage) {
|
||||||
if (selectedGpxFile != null) {
|
if (selectedGpxFile != null) {
|
||||||
List<GpxDisplayGroup> groups = displayHelper.getDisplayGroups(new GpxDisplayItemType[] {GpxDisplayItemType.TRACK_SEGMENT});
|
List<GpxDisplayGroup> groups = displayHelper.getDisplayGroups(new GpxDisplayItemType[]{GpxDisplayItemType.TRACK_SEGMENT});
|
||||||
selectedGpxFile.setDisplayGroups(groups, app);
|
selectedGpxFile.setDisplayGroups(groups, app);
|
||||||
selectedGpxFile.processPoints(app);
|
selectedGpxFile.processPoints(app);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue