another small fix in replace color and alpha
This commit is contained in:
parent
380fc41cf6
commit
d292a69d5f
@ -52,8 +52,17 @@ class ReplaceColorAndAlpha(inkex.EffectExtension):
|
||||
except Exception as e:
|
||||
inkex.utils.debug(e)
|
||||
pass
|
||||
|
||||
elements = []
|
||||
if self.svg.selected:
|
||||
for id, node in self.svg.selected.items():
|
||||
elements.append(node)
|
||||
else:
|
||||
svg = self.document.getroot()
|
||||
for element in svg.iter("*"):
|
||||
for svg_element in svg.iter("*"):
|
||||
elements.append(svg_element)
|
||||
|
||||
for element in elements:
|
||||
style = element.get('style')
|
||||
if style:
|
||||
if (style.lower().find('fill:#'+fr[:6]) != -1 and len(fr) == 6) or (style.lower().find('fill-opacity:'+alphaFr[:4]) != -1 and len(fr)==8 and style.lower().find('fill:#'+fr[:6]) != -1):
|
||||
|
Loading…
Reference in New Issue
Block a user