Code

another createElement instead of repr_new
authoracspike <acspike@users.sourceforge.net>
Wed, 24 Jan 2007 04:03:19 +0000 (04:03 +0000)
committeracspike <acspike@users.sourceforge.net>
Wed, 24 Jan 2007 04:03:19 +0000 (04:03 +0000)
src/extension/effect.cpp

index 041ec4f536097abc8e3a5e2eba8bd7cf1ff1a8e8..1fef1a9db9f0f8032099dd84a45504417cf13636 100644 (file)
@@ -72,7 +72,7 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation *
 
     if (_effects_list != NULL) {
         Inkscape::XML::Document *xml_doc;
-        xml_doc = _effects_list->parent()->document();
+        xml_doc = _effects_list->document();
         _menu_node = xml_doc->createElement("verb");
         _menu_node->setAttribute("verb-id", this->get_id(), false);
 
@@ -105,8 +105,10 @@ Effect::merge_menu (Inkscape::XML::Node * base,
         gchar const * menuname = patern->attribute("name");
         if (menuname == NULL) menuname = patern->attribute("_name");
         if (menuname == NULL) return;
-
-        tomerge = sp_repr_new("submenu");
+        
+        Inkscape::XML::Document *xml_doc;
+        xml_doc = base->document();
+        tomerge = xml_doc->createElement("submenu");
         tomerge->setAttribute("name", menuname, false);
 
         mergename = _(menuname);