fix for gpx selection issue #6515

This commit is contained in:
madwasp79 2019-05-05 13:43:58 +03:00
parent 918a756165
commit caa2c08454
2 changed files with 7 additions and 1 deletions

View file

@ -69,6 +69,12 @@ public class GpxSelectionHelper {
saveCurrentSelections();
}
public void clearAllGpxFilesWithoutBackup() {
selectedGpxFilesBackUp.clear();
selectedGPXFiles = new ArrayList<>();
saveCurrentSelections();
}
public void restoreSelectedGpxFiles() {
for (Entry<GPXFile, Long> gpxEntry : selectedGpxFilesBackUp.entrySet()) {
if (!Algorithms.isEmpty(gpxEntry.getKey().path)) {

View file

@ -613,7 +613,7 @@ public class GpxUiHelper {
//clear all previously selected files before adding new one
OsmandApplication app = (OsmandApplication) activity.getApplication();
if (app != null && app.getSelectedGpxHelper() != null) {
app.getSelectedGpxHelper().clearAllGpxFileToShow();
app.getSelectedGpxHelper().clearAllGpxFilesWithoutBackup();
}
if (app != null && showCurrentGpx && adapter.getItem(0).getSelected()) {
currentGPX = app.getSavingTrackHelper().getCurrentGpx();