diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 138927bf07..59020916ba 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -61,7 +61,9 @@ public class GpxSelectionHelper { if (!selectedGpxFilesBackUp.isEmpty()) { selectedGPXFiles.clear(); selectedGPXFiles.addAll(selectedGpxFilesBackUp); + saveCurrentSelections(); } + } public boolean isSelectedGpxFilesBackUp() { diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java index 80cfb684b1..a37d883b52 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java @@ -39,24 +39,6 @@ public class ShowHideGpxTracksAction extends QuickAction { selectedGpxHelper.clearAllGpxFileToShow(); } else { selectedGpxHelper.restoreSelectedGpxFiles(); - - final File dir = activity.getMyApplication().getAppPath(IndexConstants.GPX_INDEX_DIR); - CallbackWithObject callbackWithObject = new CallbackWithObject() { - @Override - public boolean processResult(GPXFile[] result) { - return true; - } - }; - selectedGpxHelper.restoreSelectedGpxFiles(); - List selectedGpxFiles = selectedGpxHelper - .getSelectedGPXFiles(); - List files = new ArrayList<>(); - for (GpxSelectionHelper.SelectedGpxFile file : selectedGpxFiles) { - files.add(file.getGpxFile().path.substring(file.getGpxFile().path.lastIndexOf("/"))); - } - - GpxUiHelper.loadFileInDifferentThread(activity, callbackWithObject, dir, - files.toArray(new String[files.size()])); } }