commit
0a62b3f5f6
4 changed files with 12 additions and 5 deletions
|
@ -10,6 +10,7 @@ public class RenderingRuleStorageProperties {
|
||||||
public static final String UI_CATEGORY_HIDDEN = "ui_hidden";
|
public static final String UI_CATEGORY_HIDDEN = "ui_hidden";
|
||||||
public static final String A_ENGINE_V1 = "engine_v1";
|
public static final String A_ENGINE_V1 = "engine_v1";
|
||||||
public static final String A_APP_MODE= "appMode";
|
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_DEFAULT_COLOR = "defaultColor";
|
||||||
public static final String A_SHADOW_RENDERING = "shadowRendering";
|
public static final String A_SHADOW_RENDERING = "shadowRendering";
|
||||||
|
|
|
@ -2982,10 +2982,8 @@ public class OsmandSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
CommonPreference<String> pref = getCustomRenderProperty("appMode");
|
getCustomRenderProperty("appMode");
|
||||||
pref.setModeDefaultValue(ApplicationMode.CAR, "car");
|
getCustomRenderProperty("defAppMode");
|
||||||
pref.setModeDefaultValue(ApplicationMode.PEDESTRIAN, "pedestrian");
|
|
||||||
pref.setModeDefaultValue(ApplicationMode.BICYCLE, "bicycle");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, CommonPreference<Boolean>> customBooleanRendersProps = new LinkedHashMap<String, OsmandSettings.CommonPreference<Boolean>>();
|
Map<String, CommonPreference<Boolean>> customBooleanRendersProps = new LinkedHashMap<String, OsmandSettings.CommonPreference<Boolean>>();
|
||||||
|
|
|
@ -1176,6 +1176,7 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
private boolean isPropertyAccepted(RenderingRuleProperty p) {
|
private boolean isPropertyAccepted(RenderingRuleProperty p) {
|
||||||
return !(p.getAttrName().equals(RenderingRuleStorageProperties.A_APP_MODE) ||
|
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(RenderingRuleStorageProperties.A_ENGINE_V1) ||
|
||||||
p.getAttrName().equals(HIKING_ROUTES_OSMC_ATTR) ||
|
p.getAttrName().equals(HIKING_ROUTES_OSMC_ATTR) ||
|
||||||
p.getAttrName().equals(ROAD_STYLE_ATTR) ||
|
p.getAttrName().equals(ROAD_STYLE_ATTR) ||
|
||||||
|
|
|
@ -66,7 +66,6 @@ import android.os.Looper;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class MapRenderRepositories {
|
public class MapRenderRepositories {
|
||||||
|
|
||||||
// It is needed to not draw object twice if user have map index that intersects by boundaries
|
// It is needed to not draw object twice if user have map index that intersects by boundaries
|
||||||
public static boolean checkForDuplicateObjectIds = true;
|
public static boolean checkForDuplicateObjectIds = true;
|
||||||
|
|
||||||
|
@ -644,9 +643,17 @@ public class MapRenderRepositories {
|
||||||
// find selected rendering type
|
// find selected rendering type
|
||||||
OsmandApplication app = ((OsmandApplication) context.getApplicationContext());
|
OsmandApplication app = ((OsmandApplication) context.getApplicationContext());
|
||||||
boolean nightMode = app.getDaynightHelper().isNightMode();
|
boolean nightMode = app.getDaynightHelper().isNightMode();
|
||||||
|
|
||||||
// boolean moreDetail = prefs.SHOW_MORE_MAP_DETAIL.get();
|
// boolean moreDetail = prefs.SHOW_MORE_MAP_DETAIL.get();
|
||||||
RenderingRulesStorage storage = app.getRendererRegistry().getCurrentSelectedRenderer();
|
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);
|
RenderingRuleSearchRequest renderingReq = getSearchRequestWithAppliedCustomRules(storage, nightMode);
|
||||||
|
|
||||||
renderingReq.saveState();
|
renderingReq.saveState();
|
||||||
NativeOsmandLibrary nativeLib = !prefs.SAFE_MODE.get() ? NativeOsmandLibrary.getLibrary(storage, context) : null;
|
NativeOsmandLibrary nativeLib = !prefs.SAFE_MODE.get() ? NativeOsmandLibrary.getLibrary(storage, context) : null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue