fix for #7545
This commit is contained in:
parent
6b221be979
commit
4bc796aa19
4 changed files with 12 additions and 6 deletions
|
@ -10,6 +10,7 @@ public class RenderingRuleStorageProperties {
|
|||
public static final String UI_CATEGORY_HIDDEN = "ui_hidden";
|
||||
public static final String A_ENGINE_V1 = "engine_v1";
|
||||
public static final String A_APP_MODE= "appMode";
|
||||
public static final String A_BASE_APP_MODE = "baseAppMode";
|
||||
|
||||
public static final String A_DEFAULT_COLOR = "defaultColor";
|
||||
public static final String A_SHADOW_RENDERING = "shadowRendering";
|
||||
|
|
|
@ -1079,7 +1079,6 @@ public class OsmandSettings {
|
|||
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_START = new BooleanPreference("should_show_dashboard_on_start", false).makeGlobal();
|
||||
public final CommonPreference<Boolean> SHOW_DASHBOARD_ON_MAP_SCREEN = new BooleanPreference("show_dashboard_on_map_screen", false).makeGlobal();
|
||||
public final CommonPreference<Boolean> SHOW_OSMAND_WELCOME_SCREEN = new BooleanPreference("show_osmand_welcome_screen", true).makeGlobal();
|
||||
|
||||
public final CommonPreference<String> API_NAV_DRAWER_ITEMS_JSON = new StringPreference("api_nav_drawer_items_json", "{}").makeGlobal();
|
||||
public final CommonPreference<String> API_CONNECTED_APPS_JSON = new StringPreference("api_connected_apps_json", "[]") {
|
||||
@Override
|
||||
|
@ -2988,10 +2987,8 @@ public class OsmandSettings {
|
|||
}
|
||||
|
||||
{
|
||||
CommonPreference<String> pref = getCustomRenderProperty("appMode");
|
||||
pref.setModeDefaultValue(ApplicationMode.CAR, "car");
|
||||
pref.setModeDefaultValue(ApplicationMode.PEDESTRIAN, "pedestrian");
|
||||
pref.setModeDefaultValue(ApplicationMode.BICYCLE, "bicycle");
|
||||
getCustomRenderProperty("appMode");
|
||||
getCustomRenderProperty("defAppMode");
|
||||
}
|
||||
|
||||
Map<String, CommonPreference<Boolean>> customBooleanRendersProps = new LinkedHashMap<String, OsmandSettings.CommonPreference<Boolean>>();
|
||||
|
|
|
@ -1176,6 +1176,7 @@ public class ConfigureMapMenu {
|
|||
|
||||
private boolean isPropertyAccepted(RenderingRuleProperty p) {
|
||||
return !(p.getAttrName().equals(RenderingRuleStorageProperties.A_APP_MODE) ||
|
||||
p.getAttrName().equals(RenderingRuleStorageProperties.A_BASE_APP_MODE) ||
|
||||
p.getAttrName().equals(RenderingRuleStorageProperties.A_ENGINE_V1) ||
|
||||
p.getAttrName().equals(HIKING_ROUTES_OSMC_ATTR) ||
|
||||
p.getAttrName().equals(ROAD_STYLE_ATTR) ||
|
||||
|
|
|
@ -66,7 +66,6 @@ import android.os.Looper;
|
|||
import android.widget.Toast;
|
||||
|
||||
public class MapRenderRepositories {
|
||||
|
||||
// It is needed to not draw object twice if user have map index that intersects by boundaries
|
||||
public static boolean checkForDuplicateObjectIds = true;
|
||||
|
||||
|
@ -644,9 +643,17 @@ public class MapRenderRepositories {
|
|||
// find selected rendering type
|
||||
OsmandApplication app = ((OsmandApplication) context.getApplicationContext());
|
||||
boolean nightMode = app.getDaynightHelper().isNightMode();
|
||||
|
||||
// boolean moreDetail = prefs.SHOW_MORE_MAP_DETAIL.get();
|
||||
RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
|
||||
prefs.getCustomRenderProperty("appMode").setModeValue(prefs.APPLICATION_MODE.get(),
|
||||
app.getSettings().APPLICATION_MODE.get().getStringKey());
|
||||
prefs.getCustomRenderProperty("baseAppMode").setModeValue(prefs.APPLICATION_MODE.get(),
|
||||
app.getSettings().APPLICATION_MODE.get().getParent() != null
|
||||
? prefs.APPLICATION_MODE.get().getParent().getStringKey()
|
||||
: prefs.APPLICATION_MODE.get().getStringKey());
|
||||
RenderingRuleSearchRequest renderingReq = getSearchRequestWithAppliedCustomRules(storage, nightMode);
|
||||
|
||||
renderingReq.saveState();
|
||||
NativeOsmandLibrary nativeLib = !prefs.SAFE_MODE.get() ? NativeOsmandLibrary.getLibrary(storage, context) : null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue