From: buliabyak Date: Sat, 29 Nov 2008 05:30:26 +0000 (+0000) Subject: allow sp_style_set_property_url to unset the property as well, if the linked object... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=67dd47d09ea3e30da176a174dadae16f475d1e43;p=inkscape.git allow sp_style_set_property_url to unset the property as well, if the linked object is NULL --- diff --git a/src/style.cpp b/src/style.cpp index a5b25e6ff..4fd8577b9 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -3849,13 +3849,15 @@ sp_style_set_property_url (SPObject *item, gchar const *property, SPObject *link if (repr == NULL) return; - g_return_if_fail(linked != NULL); - - gchar *val = g_strdup_printf("url(#%s)", SP_OBJECT_ID(linked)); - SPCSSAttr *css = sp_repr_css_attr_new(); - sp_repr_css_set_property(css, property, val); - g_free(val); + if (linked) { + gchar *val = g_strdup_printf("url(#%s)", SP_OBJECT_ID(linked)); + sp_repr_css_set_property(css, property, val); + g_free(val); + } else { + sp_repr_css_unset_property(css, "filter"); + } + if (recursive) { sp_repr_css_change_recursive(repr, css, "style"); } else {