Fixed issue when selection for show current gpx doesnt save

This commit is contained in:
Denis 2014-11-19 16:33:17 +02:00
parent 5f321bd150
commit d71e9d5425
2 changed files with 6 additions and 2 deletions

View file

@ -298,6 +298,8 @@ public class MapActivityLayers {
if (!settings.SAVE_TRACK_TO_GPX.get() && ! if (!settings.SAVE_TRACK_TO_GPX.get() && !
settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) { settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show(); AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show();
} else {
g.path = getString(R.string.show_current_gpx_title);
} }
break; break;
} }

View file

@ -142,6 +142,7 @@ public class GpxUiHelper {
allGpxList.add(0, activity.getString(R.string.show_current_gpx_title)); 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 createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter);
} }
return null; return null;
@ -166,7 +167,8 @@ public class GpxUiHelper {
return null; return null;
} }
private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List<String> allGpxList, List<String> selectedGpxList, boolean multipleChoice) { private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List<String> allGpxList,
List<String> selectedGpxList, boolean multipleChoice) {
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
//element position in adapter //element position in adapter
int i = 0; int i = 0;