From: buliabyak Date: Mon, 22 Oct 2007 13:04:42 +0000 (+0000) Subject: fix pasting style where style or fill is none X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3b265f0abae5df0496b310fa775fa6bb46e5d4ed;p=inkscape.git fix pasting style where style or fill is none --- 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