Add replace_shapes flag to scheme specification.

If flag is false, main icon shapes should not be replaced.
This commit is contained in:
Sergey Vartanov 2021-05-24 00:44:03 +03:00
parent 2ece66d5d0
commit f0f1a8beb4
2 changed files with 4 additions and 0 deletions

View file

@ -205,6 +205,8 @@ class Scheme:
for group in self.icons:
for matcher in group["tags"]:
matcher: Dict[str, Any]
if "replace_shapes" in matcher and main_icon:
continue
matched: bool = is_matched(matcher, tags)
matcher_tags: Set[str] = matcher["tags"].keys()
if not matched:

View file

@ -512,8 +512,10 @@ node_icons:
shapes: [telephone]
- tags: {information: "*"}
shapes: [information]
replace_shapes: no
- tags: {tourism: "*"}
shapes: [historic]
replace_shapes: no
- tags: {tourism: information}
shapes: [information]
- tags: {information: guidepost}