Merge pull request #6905 from osmandapp/gpx_list_fix

fix for gpx selection issue #6515
This commit is contained in:
vshcherb 2019-05-06 10:40:09 +02:00 committed by GitHub
commit d11d1f94b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,15 +161,18 @@ public class ConfigureMapMenu {
for (GpxSelectionHelper.SelectedGpxFile file : selectedGpxFiles) {
files.add(file.getGpxFile().path);
}
Map<GPXUtilities.GPXFile, Long> fls = selectedGpxHelper.getSelectedGpxFilesBackUp();
for(Map.Entry<GPXUtilities.GPXFile, Long> f : fls.entrySet()) {
if(!Algorithms.isEmpty(f.getKey().path)) {
File file = new File(f.getKey().path);
if(file.exists() && !file.isDirectory()) {
files.add(f.getKey().path);
if (selectedGpxFiles.isEmpty()) {
Map<GPXUtilities.GPXFile, Long> fls = selectedGpxHelper.getSelectedGpxFilesBackUp();
for(Map.Entry<GPXUtilities.GPXFile, Long> f : fls.entrySet()) {
if(!Algorithms.isEmpty(f.getKey().path)) {
File file = new File(f.getKey().path);
if(file.exists() && !file.isDirectory()) {
files.add(f.getKey().path);
}
}
}
}
return files;
}