From e1c71d1e3f89d98adf42b1f13b7246ae16564bcb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 24 Oct 2024 11:52:54 +1000 Subject: [PATCH] tools/clean-svg: don't force the group ID onto sub-elements The theory (I think) here is that we can have a group "A" that then applies to each subsequent element automatically without having to indidivually name those elements. This is both buggy and unnecessary and it completely breaks SVG files generated by inkscape (1.4 at least) which will automatically assign a group ID like "g1" to the group - resulting in our buttons etc. all labeled as "Buttong1". Remove this "feature". --- tools/clean_svg.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/clean_svg.py b/tools/clean_svg.py index d563afd6..544311c5 100755 --- a/tools/clean_svg.py +++ b/tools/clean_svg.py @@ -48,9 +48,6 @@ def traverse_and_clean(node): for key in list(node.attrib.keys()): if key.startswith("{"): del node.attrib[key] - if node.tag == "g" and "id" in node.attrib: - apply_id_and_class_from_group(node) - del node.attrib["id"] if "style" in node.attrib: if node.tag == "text": node.attrib["style"] = "text-anchor:start;"