summaryrefslogtreecommitdiffstats
path: root/src/sp-gradient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-gradient.cpp')
-rw-r--r--src/sp-gradient.cpp9
1 files changed, 6 insertions, 3 deletions
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 <number> 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;
}