summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-11-17 08:10:27 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-11-17 08:10:27 +0000
commit971645ba72d72c99b17b79510c0bc283a0c9dc45 (patch)
tree3d070603bc1f967e0ebbf4c31949114c67e71f0d /share
parentBetter file checking (diff)
downloadinkscape-971645ba72d72c99b17b79510c0bc283a0c9dc45.tar.gz
inkscape-971645ba72d72c99b17b79510c0bc283a0c9dc45.zip
prevent multiple processing of the same gradient if it is used by more than one selected object
(bzr r1969)
Diffstat (limited to 'share')
-rw-r--r--share/extensions/coloreffect.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/extensions/coloreffect.py b/share/extensions/coloreffect.py
index 214495502..c1ed15065 100644
--- a/share/extensions/coloreffect.py
+++ b/share/extensions/coloreffect.py
@@ -27,6 +27,7 @@ color_props = color_props_fill + color_props_stroke
class ColorEffect(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self,use_minidom=True)
+ self.visited = []
def effect(self):
if len(self.selected)==0:
@@ -81,6 +82,14 @@ class ColorEffect(inkex.Effect):
return col
def process_gradient(self, node):
+ if node.hasAttributes():
+ this_id=node.getAttribute('id')
+ if this_id in self.visited:
+ # prevent multiple processing of the same gradient if it is used by more than one selected object
+ #inkex.debug("already had: " + this_id)
+ return
+ self.visited.append(this_id)
+ #inkex.debug("visited: " + str(self.visited))
self.changeStyle(node)
if node.hasChildNodes():
for child in node.childNodes: