From d71e9d542550152fb1d20f8ff55b9d60579b6a01 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 19 Nov 2014 16:33:17 +0200 Subject: [PATCH] Fixed issue when selection for show current gpx doesnt save --- .../src/net/osmand/plus/activities/MapActivityLayers.java | 2 ++ OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index c959332b9b..a21e9f802b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -298,6 +298,8 @@ public class MapActivityLayers { if (!settings.SAVE_TRACK_TO_GPX.get() && ! settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) { AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show(); + } else { + g.path = getString(R.string.show_current_gpx_title); } break; } diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 8638557d74..36258a409e 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -141,7 +141,8 @@ public class GpxUiHelper { if(showCurrentGpx){ allGpxList.add(0, activity.getString(R.string.show_current_gpx_title)); } - final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity,allGpxList, selectedGpxList, multipleChoice); + final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity, allGpxList, selectedGpxList, multipleChoice); + return createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter); } return null; @@ -166,7 +167,8 @@ public class GpxUiHelper { return null; } - private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List allGpxList, List selectedGpxList, boolean multipleChoice) { + private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List allGpxList, + List selectedGpxList, boolean multipleChoice) { final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); //element position in adapter int i = 0;