diff --git a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java index 7b7d4ca14d..4098427f07 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java +++ b/OsmAnd-java/src/net/osmand/router/RoutingConfiguration.java @@ -114,8 +114,10 @@ public class RoutingConfiguration { } public void addImpassableRoad(RouteDataObject r) { - impassableRoadIds.add(r.id); - impassableRoads.add(r); + if (!impassableRoadIds.contains(r.id)){ + impassableRoadIds.add(r.id); + impassableRoads.add(r); + } } 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/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 3f0e10aada..7c2cfda727 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -18,6 +18,7 @@ import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.view.Window; import net.osmand.IndexConstants; import net.osmand.access.AccessibleAlertBuilder; +import net.osmand.map.OsmandRegions; import net.osmand.plus.*; import net.osmand.plus.activities.FavouritesActivity; import net.osmand.plus.activities.LocalIndexInfo; @@ -596,4 +597,20 @@ public class DownloadActivity extends SherlockFragmentActivity { } } + public static String getFullName(IndexItem e, OsmandApplication app, OsmandRegions osmandRegions) { + String eName; + List forCat = new ArrayList(); + forCat.add(e); + List category = IndexItemCategory.categorizeIndexItems(app, forCat); + if (category.size() != 0){ + eName = e.getVisibleDescription(app) + "\n" + + category.get(0).name + " " + + e.getVisibleName(app, osmandRegions); + } else { + eName = e.getVisibleDescription(app) + "\n" + + e.getVisibleName(app, osmandRegions); + } + return eName; + } + } diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index 19ebdb4e53..3c2577d861 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -961,8 +961,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { private String getNameToDisplay(LocalIndexInfo child) { String mapDescr = getMapDescription(child.getFileName()); - String mapName = FileNameTranslationHelper.getFileName(ctx, ((OsmandApplication) getDownloadActivity().getApplication()).getResourceManager().getOsmandRegions(), child.getFileName()); - + String mapName = FileNameTranslationHelper.getFileName(ctx, + ((OsmandApplication) getDownloadActivity().getApplication()).getResourceManager().getOsmandRegions(), + child.getFileName()); if (mapDescr.length() > 0){ return mapDescr + " - " + mapName; } else { diff --git a/OsmAnd/src/net/osmand/plus/download/UpdatesIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/UpdatesIndexFragment.java index 3a123d86af..02d35716fc 100644 --- a/OsmAnd/src/net/osmand/plus/download/UpdatesIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/UpdatesIndexFragment.java @@ -202,7 +202,8 @@ public class UpdatesIndexFragment extends SherlockListFragment { TextView name = (TextView) v.findViewById(R.id.download_item); TextView description = (TextView) v.findViewById(R.id.download_descr); IndexItem e = items.get(position); - String eName = e.getVisibleDescription(getMyApplication()) + "\n" + e.getVisibleName(getMyApplication(), osmandRegions); + String eName = DownloadActivity.getFullName(e, getMyApplication(), osmandRegions); + name.setText(eName.trim()); //$NON-NLS-1$ String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication()); description.setText(d); 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;