Hide track after wpt was displayed
This commit is contained in:
parent
624380773b
commit
fbc6665d76
2 changed files with 14 additions and 3 deletions
|
@ -422,7 +422,7 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isGpxFileSelected(GPXFile gpxFile) {
|
public boolean isGpxFileSelected(GPXFile gpxFile) {
|
||||||
return gpxFile != null &&
|
return gpxFile != null &&
|
||||||
((gpxFile.showCurrentTrack && app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null) ||
|
((gpxFile.showCurrentTrack && app.getSelectedGpxHelper().getSelectedCurrentRecordingTrack() != null) ||
|
||||||
(gpxFile.path != null && app.getSelectedGpxHelper().getSelectedFileByPath(gpxFile.path) != null));
|
(gpxFile.path != null && app.getSelectedGpxHelper().getSelectedFileByPath(gpxFile.path) != null));
|
||||||
|
|
|
@ -633,8 +633,19 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
||||||
}
|
}
|
||||||
updateSelectionMode(actionMode);
|
updateSelectionMode(actionMode);
|
||||||
} else {
|
} else {
|
||||||
if (item.group.getGpx() != null) {
|
GPXFile gpx = item.group.getGpx();
|
||||||
app.getSelectedGpxHelper().setGpxFileToDisplay(item.group.getGpx());
|
if (gpx != null) {
|
||||||
|
TrackActivity trackActivity = getTrackActivity();
|
||||||
|
if (trackActivity != null && fragmentAdapter != null) {
|
||||||
|
boolean gpxFileSelected = fragmentAdapter.isGpxFileSelected(gpx);
|
||||||
|
if (!gpxFileSelected) {
|
||||||
|
Intent intent = trackActivity.getIntent();
|
||||||
|
if (intent != null) {
|
||||||
|
intent.putExtra(TrackActivity.SHOW_TEMPORARILY, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
app.getSelectedGpxHelper().setGpxFileToDisplay(gpx);
|
||||||
}
|
}
|
||||||
final OsmandSettings settings = app.getSettings();
|
final OsmandSettings settings = app.getSettings();
|
||||||
LatLon location = new LatLon(item.locationStart.lat, item.locationStart.lon);
|
LatLon location = new LatLon(item.locationStart.lat, item.locationStart.lon);
|
||||||
|
|
Loading…
Reference in a new issue