From 5949668e12a892c81e3e6ee5eb14be77d9353688 Mon Sep 17 00:00:00 2001 From: leyghisbb Date: Thu, 22 Apr 2021 22:43:03 +0200 Subject: [PATCH] enhanced logic for Cleanup Styles extension --- extensions/fablabchemnitz/cleanup_styles.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/fablabchemnitz/cleanup_styles.py b/extensions/fablabchemnitz/cleanup_styles.py index 5e5911b2..7ed51b9c 100644 --- a/extensions/fablabchemnitz/cleanup_styles.py +++ b/extensions/fablabchemnitz/cleanup_styles.py @@ -164,7 +164,14 @@ class Cleanup(inkex.EffectExtension): declarations[i] = prop + ':' + new_val if prop == 'fill-opacity': new_val = '1' - declarations[i] = prop + ':' + new_val + declarations[i] = prop + ':' + new_val + if self.options.apply_hairlines is False: + if prop == '-inkscape-stroke': + if val == 'hairline': + del declarations[i] + if prop == 'vector-effect': + if val == 'non-scaling-stroke': + del declarations[i] node.set('style', ';'.join(declarations)) # if element is group we add it to collection to remove it's style after parsing all selected items