Code

fix bug #239092
authormental <mental@users.sourceforge.net>
Wed, 11 Jun 2008 16:34:55 +0000 (16:34 +0000)
committermental <mental@users.sourceforge.net>
Wed, 11 Jun 2008 16:34:55 +0000 (16:34 +0000)
src/extension/implementation/script.cpp

index 4eeb3f27f92d1f195ae7694b59df778ee3d1211a..4c705f5cf27c6e575cbe5b3effcdab2838c6c221 100644 (file)
@@ -844,11 +844,11 @@ Script::copy_doc (Inkscape::XML::Node * oldroot, Inkscape::XML::Node * newroot)
                 for (Inkscape::XML::Node * newroot_namedview_child = child->firstChild();
                         newroot_namedview_child != NULL;
                         newroot_namedview_child = newroot_namedview_child->next()) {
-                    oldroot_namedview->appendChild(newroot_namedview_child->duplicate(child->document()));
+                    oldroot_namedview->appendChild(newroot_namedview_child->duplicate(oldroot->document()));
                 }
             }
         } else {
-            oldroot->appendChild(child->duplicate(newroot->document()));
+            oldroot->appendChild(child->duplicate(oldroot->document()));
         }
     }