summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-10-22 13:04:42 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-10-22 13:04:42 +0000
commit418f5ec8696ebfa84fe8e05d74651a2daaff3cd3 (patch)
treee7dc1f6cec282fe93b7ea0f3cde53f54638f6681 /src/gradient-drag.cpp
parentmake sure ctrl-alt-click adds node to the gradient that's actually clicked (diff)
downloadinkscape-418f5ec8696ebfa84fe8e05d74651a2daaff3cd3.tar.gz
inkscape-418f5ec8696ebfa84fe8e05d74651a2daaff3cd3.zip
fix pasting style where style or fill is none
(bzr r3940)
Diffstat (limited to 'src/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index a40b9047f..67fa09333 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -224,9 +224,9 @@ gr_drag_style_set (const SPCSSAttr *css, gpointer data)
os << accumulated;
sp_repr_css_set_property (stop, "stop-opacity", os.str().c_str());
- if ((css->attribute("fill") && !strcmp(css->attribute("fill"), "none")) ||
- (css->attribute("stroke") && !strcmp(css->attribute("stroke"), "none")))
- sp_repr_css_set_property (stop, "stop-opacity", "0"); // if set to none, don't change color, set opacity to 0
+ if ((css->attribute("fill") && !css->attribute("stroke") && !strcmp(css->attribute("fill"), "none")) ||
+ (css->attribute("stroke") && !css->attribute("fill") && !strcmp(css->attribute("stroke"), "none")))
+ sp_repr_css_set_property (stop, "stop-opacity", "0"); // if a single fill/stroke property is set to none, don't change color, set opacity to 0
}
if (!stop->attributeList()) { // nothing for us here, pass it on