From 4082bdf11e71874d0bf86f34dbd3c7532ffa91b1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 31 Jul 2016 00:42:36 +0200 Subject: [PATCH] Fix 2881 --- OsmAnd/res/values-de/strings.xml | 2 +- .../osmand/plus/dialogs/ConfigureMapMenu.java | 36 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index ee15f0b6f2..198ddeb8a6 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -2472,5 +2472,5 @@ Falls Sie OsmAnd mögen und das Projekt OpenStreetMap unterstützen wollen, so i Suche %1$s entfernt Koordinatensuche (erweitert) Koordinatensuche - %1$ s Haltestellen vor + %1$s Haltestellen vor diff --git a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java index b549de1470..fad9b12fb7 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/ConfigureMapMenu.java @@ -590,27 +590,25 @@ public class ConfigureMapMenu { final ItemClickListener clickListener = new ContextMenuAdapter.ItemClickListener() { @Override public boolean onContextMenuClick(ArrayAdapter a, int itemId, int pos, - boolean isChecked) { - if (!isChecked) { - for (int i = 0; i < prefs.size(); i++) { - prefs.get(i).set(false); - } - a.notifyDataSetInvalidated(); - refreshMapComplete(activity); - activity.getMapLayers().updateLayers(activity.getMapView()); - } else { - showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs, - useDescription); - } - return false; + boolean isChecked) { + if (!isChecked && !useDescription) { + for (int i = 0; i < prefs.size(); i++) { + prefs.get(i).set(false); } - + a.notifyDataSetInvalidated(); + refreshMapComplete(activity); + activity.getMapLayers().updateLayers(activity.getMapView()); + } else { + showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs, + useDescription); + } + return false; + } + }; - ContextMenuItem.ItemBuilder builder = new ContextMenuItem.ItemBuilder() - .setTitleId(strId, activity) - .setIcon(icon) - .setListener(clickListener); - if(useDescription) { + ContextMenuItem.ItemBuilder builder = new ContextMenuItem.ItemBuilder().setTitleId(strId, activity) + .setIcon(icon).setListener(clickListener); + if (useDescription) { final String descr = getDescription(prefs); builder.setDescription(descr); builder.setLayout(R.layout.list_item_single_line_descrition_narrow);