From: buliabyak Date: Sun, 26 Aug 2007 22:25:37 +0000 (+0000) Subject: calling parent's write method may reset the stop's color from repr if it was changed... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e9ddb5915978ddd65d9a7a96bfada29cf5213b3a;p=inkscape.git calling parent's write method may reset the stop's color from repr if it was changed in the object but not yet written to repr; to fix it, remember the specified color before calling parent write --- diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index d35e89bed..8fad6074a 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -208,6 +208,8 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) repr = xml_doc->createElement("svg:stop"); } + guint32 specifiedcolor = sp_color_get_rgba32_ualpha(&stop->specified_color, 255); + if (((SPObjectClass *) stop_parent_class)->write) (* ((SPObjectClass *) stop_parent_class)->write)(object, repr, flags); @@ -221,7 +223,7 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) os << "currentColor"; } else { gchar c[64]; - sp_svg_write_color(c, 64, sp_color_get_rgba32_ualpha(&stop->specified_color, 255)); + sp_svg_write_color(c, 64, specifiedcolor); os << c; } os << ";stop-opacity:" << stop->opacity;