Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f993f49e8a
3 changed files with 12 additions and 3 deletions
|
@ -7,6 +7,9 @@ import java.util.Map;
|
|||
|
||||
public class RenderingRuleStorageProperties {
|
||||
|
||||
public static final String A_ENGINE_V1 = "engine_v1";
|
||||
public static final String A_APP_MODE= "appMode";
|
||||
|
||||
public static final String A_DEFAULT_COLOR = "defaultColor";
|
||||
public static final String A_SHADOW_RENDERING = "shadowRendering";
|
||||
public static final String ATTR_INT_VALUE = "attrIntValue";
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.osmand.plus.activities.SettingsActivity;
|
|||
import net.osmand.plus.activities.TransportRouteHelper;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.render.RenderingRuleProperty;
|
||||
import net.osmand.render.RenderingRuleStorageProperties;
|
||||
import net.osmand.render.RenderingRulesStorage;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -326,7 +327,8 @@ public class ConfigureMapMenu {
|
|||
List<RenderingRuleProperty> customRules ){
|
||||
final OsmandMapTileView view = activity.getMapView();
|
||||
for (final RenderingRuleProperty p : customRules) {
|
||||
if (p.getAttrName().equals("appMode")){
|
||||
if (p.getAttrName().equals(RenderingRuleStorageProperties.A_APP_MODE) ||
|
||||
p.getAttrName().equals(RenderingRuleStorageProperties.A_ENGINE_V1)){
|
||||
continue;
|
||||
}
|
||||
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(),
|
||||
|
|
|
@ -586,8 +586,12 @@ public class MapRenderRepositories {
|
|||
renderingReq.setBooleanFilter(renderingReq.ALL.R_NIGHT_MODE, nightMode);
|
||||
for (RenderingRuleProperty customProp : storage.PROPS.getCustomRules()) {
|
||||
if (customProp.isBoolean()) {
|
||||
CommonPreference<Boolean> pref = prefs.getCustomRenderBooleanProperty(customProp.getAttrName());
|
||||
renderingReq.setBooleanFilter(customProp, pref.get());
|
||||
if(customProp.getAttrName().equals(RenderingRuleStorageProperties.A_ENGINE_V1)) {
|
||||
renderingReq.setBooleanFilter(customProp, true);
|
||||
} else {
|
||||
CommonPreference<Boolean> pref = prefs.getCustomRenderBooleanProperty(customProp.getAttrName());
|
||||
renderingReq.setBooleanFilter(customProp, pref.get());
|
||||
}
|
||||
} else {
|
||||
CommonPreference<String> settings = prefs.getCustomRenderProperty(customProp.getAttrName());
|
||||
String res = settings.get();
|
||||
|
|
Loading…
Reference in a new issue