Code

fix pasting style where style or fill is none
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 22 Oct 2007 13:04:42 +0000 (13:04 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 22 Oct 2007 13:04:42 +0000 (13:04 +0000)
src/gradient-drag.cpp

index a40b9047ff4889f473e9dbefe75f09ce16ad6abb..67fa0933372e19c2a62191fbc50512cccae731e5 100644 (file)
@@ -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