Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-01-08 22:55:01 +01:00
commit 7b2526e76a
2 changed files with 11 additions and 1 deletions

View file

@ -160,6 +160,13 @@ public class RenderingRule {
ifElseChildren.add(rr);
}
public void addToBeginIfElseChildren(RenderingRule rr){
if(ifElseChildren == null){
ifElseChildren = new ArrayList<RenderingRule>();
}
ifElseChildren.add(0, rr);
}
public boolean isGroup() {
return isGroup;
}

View file

@ -107,9 +107,12 @@ public class RenderingRulesStorage {
if (renderingAttributes.containsKey(e.getKey())) {
RenderingRule root = renderingAttributes.get(e.getKey());
List<RenderingRule> list = e.getValue().getIfElseChildren();
e.getValue().addToBeginIfElseChildren(root);
for (RenderingRule every : list) {
if(every != root) {
root.addIfElseChildren(every);
}
}
} else {
renderingAttributes.put(e.getKey(), e.getValue());
}