From 8799800aa0462e28a371123d064bf5fb0cf7de5b Mon Sep 17 00:00:00 2001 From: bulia byak Date: Fri, 6 Apr 2007 05:52:59 +0000 Subject: fix 1695287 (bzr r2822) --- src/sp-gradient.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/sp-gradient.cpp') 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; } -- cgit v1.2.3