diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 5e3afa593a..a0a8f3251e 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -22,6 +22,7 @@ import android.support.v7.widget.ListPopupWindow; import android.support.v7.widget.SwitchCompat; import android.text.SpannableString; import android.text.style.StyleSpan; +import android.util.Log; import android.util.TypedValue; import android.view.Gravity; import android.view.View; @@ -958,6 +959,7 @@ public class GpxUiHelper { final File f = new File(dir, fname); GPXFile res = GPXUtilities.loadGPXFile(f); if (res.error != null && res.error.getMessage().length() > 0) { + Log.d("GpxUiHelper", res.error.getMessage() + "\n"); w += res.error.getMessage() + "\n"; } result[k++] = res; diff --git a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java index 5b73fd2b5a..80cfb684b1 100644 --- a/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java +++ b/OsmAnd/src/net/osmand/plus/quickaction/actions/ShowHideGpxTracksAction.java @@ -40,22 +40,10 @@ public class ShowHideGpxTracksAction extends QuickAction { } else { selectedGpxHelper.restoreSelectedGpxFiles(); - final OsmandSettings setting = activity.getMyApplication().getSettings(); final File dir = activity.getMyApplication().getAppPath(IndexConstants.GPX_INDEX_DIR); CallbackWithObject callbackWithObject = new CallbackWithObject() { @Override public boolean processResult(GPXFile[] result) { - for (GPXFile g : result) { - if (g.showCurrentTrack) { - if (!setting.SAVE_TRACK_TO_GPX.get() - && !setting.SAVE_GLOBAL_TRACK_TO_GPX.get()) { - Toast.makeText(activity, - R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_LONG) - .show(); - } - break; - } - } return true; } }; @@ -64,7 +52,7 @@ public class ShowHideGpxTracksAction extends QuickAction { .getSelectedGPXFiles(); List files = new ArrayList<>(); for (GpxSelectionHelper.SelectedGpxFile file : selectedGpxFiles) { - files.add(file.getGpxFile().path); + files.add(file.getGpxFile().path.substring(file.getGpxFile().path.lastIndexOf("/"))); } GpxUiHelper.loadFileInDifferentThread(activity, callbackWithObject, dir,