Remove unnecessary call to search for renderingAttributeRule

(cherry picked from commit 2b69d0908c)
This commit is contained in:
Chumva 2019-07-20 13:40:05 +03:00
parent d8d4505e06
commit 02ace7b6b8

View file

@ -1419,7 +1419,7 @@ public class ConfigureMapMenu {
gpxRule = renderer.getRenderingAttributeRule("gpx");
}
if (gpxRule != null && gpxRule.getIfElseChildren().size() > 0) {
List<RenderingRule> rules = renderer.getRenderingAttributeRule("gpx").getIfElseChildren().get(0).getIfElseChildren();
List<RenderingRule> rules = gpxRule.getIfElseChildren().get(0).getIfElseChildren();
for (RenderingRule r : rules) {
String cName = r.getStringPropertyValue(CURRENT_TRACK_COLOR_ATTR);
if (!Algorithms.isEmpty(cName) && cName.equals(colorName)) {
@ -1440,7 +1440,7 @@ public class ConfigureMapMenu {
gpxRule = renderer.getRenderingAttributeRule("gpx");
}
if (gpxRule != null && gpxRule.getIfElseChildren().size() > 0) {
List<RenderingRule> rules = renderer.getRenderingAttributeRule("gpx").getIfElseChildren().get(0).getIfElseChildren();
List<RenderingRule> rules = gpxRule.getIfElseChildren().get(0).getIfElseChildren();
for (RenderingRule r : rules) {
String cName = r.getStringPropertyValue(CURRENT_TRACK_COLOR_ATTR);
if (!Algorithms.isEmpty(cName) && color == r.getIntPropertyValue(COLOR_ATTR)) {