From: buliabyak Date: Fri, 6 Apr 2007 05:52:59 +0000 (+0000) Subject: fix 1695287 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a6c56b53321edf0acd9cac49f2b9882841b53051;p=inkscape.git fix 1695287 --- diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index 4fd221225..d5a733b4f 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -208,6 +208,12 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) repr = xml_doc->createElement("svg:stop"); } + if (((SPObjectClass *) stop_parent_class)->write) + (* ((SPObjectClass *) stop_parent_class)->write)(object, repr, flags); + + // Since we do a hackish style setting here (because SPStyle does not support stop-color and + // stop-opacity), we must do it AFTER calling the parent write method; otherwise + // sp_object_write would clear our style= attribute (bug 1695287) Inkscape::CSSOStringStream os; os << "stop-color:"; @@ -226,9 +232,6 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) /* strictly speaking, offset an SVG rather than a CSS one, but exponents make no sense * for offset proportions. */ - if (((SPObjectClass *) stop_parent_class)->write) - (* ((SPObjectClass *) stop_parent_class)->write)(object, repr, flags); - return repr; }