Merge pull request #4449 from osmandapp/sasha_pasha_branch

Sasha pasha branch
This commit is contained in:
Alexey 2017-09-18 13:12:12 +03:00 committed by GitHub
commit c442b04d77
2 changed files with 10 additions and 0 deletions

View file

@ -482,6 +482,7 @@ public class GpxSelectionHelper {
selectedGPXFiles.remove(sf); selectedGPXFiles.remove(sf);
} }
} }
syncGpx(gpx);
return sf; return sf;
} }

View file

@ -542,6 +542,7 @@ public class TrackPointFragment extends OsmandExpandableListFragment {
app.getSelectedGpxHelper().setGpxFileToDisplay(gpx); app.getSelectedGpxHelper().setGpxFileToDisplay(gpx);
} }
} }
syncGpx(gpx);
} }
selectedItems.clear(); selectedItems.clear();
selectedGroups.clear(); selectedGroups.clear();
@ -551,6 +552,14 @@ public class TrackPointFragment extends OsmandExpandableListFragment {
}.execute(); }.execute();
} }
private void syncGpx(GPXFile gpxFile) {
File gpx = new File(gpxFile.path);
if (gpx.exists()) {
app.getMapMarkersHelper().syncGroup(new MarkersSyncGroup(gpx.getAbsolutePath(),
AndroidUtils.trimExtension(gpx.getName()), MarkersSyncGroup.GPX_TYPE));
}
}
private void enterMapMarkersMode() { private void enterMapMarkersMode() {
actionMode = getActionBarActivity().startSupportActionMode(new ActionMode.Callback() { actionMode = getActionBarActivity().startSupportActionMode(new ActionMode.Callback() {