Code

fix 1675213: update symm nodes when moving with Ctrl and when adding new node
[inkscape.git] / src / sp-clippath.cpp
index 501b5fcfd91caf5aea8d870a1d55e5f69bad4153..a1927f337c052ad9d554221b267339e438e05121 100644 (file)
@@ -245,7 +245,8 @@ static Inkscape::XML::Node *
 sp_clippath_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
 {
     if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
-        repr = sp_repr_new("svg:clipPath");
+        Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
+        repr = xml_doc->createElement("svg:clipPath");
     }
 
     if (((SPObjectClass *) (parent_class))->write)
@@ -387,7 +388,8 @@ sp_clippath_create (GSList *reprs, SPDocument *document, NR::Matrix const* apply
 {
     Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
 
-    Inkscape::XML::Node *repr = sp_repr_new ("svg:clipPath");
+    Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
+    Inkscape::XML::Node *repr = xml_doc->createElement("svg:clipPath");
     repr->setAttribute("clipPathUnits", "userSpaceOnUse");
     
     defsrepr->appendChild(repr);