diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-09-19 01:52:19 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-09-19 01:52:19 +0000 |
| commit | bf7c3e8d98b557cb64447804399797d93e1cedc0 (patch) | |
| tree | 80848f225cad4c163c32ce4d2ec963982558adba /src/file.cpp | |
| parent | Fix for 900602 : Enter key returns focus to canvas for Font family selector (diff) | |
| download | inkscape-bf7c3e8d98b557cb64447804399797d93e1cedc0.tar.gz inkscape-bf7c3e8d98b557cb64447804399797d93e1cedc0.zip | |
Fix for 643150 : Auto-palette swatches duplicated on copy and paste
(bzr r11677)
Diffstat (limited to '')
| -rw-r--r-- | src/file.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/file.cpp b/src/file.cpp index dcdae1700..778306d5d 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1142,6 +1142,8 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, place_to_insert = in_doc->getRoot(); } + in_doc->importDefs(doc); + // Construct a new object representing the imported image, // and insert it into the current document. SPObject *new_obj = NULL; @@ -1162,12 +1164,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, // don't lose top-level defs or style elements else if (child->getRepr()->type() == Inkscape::XML::ELEMENT_NODE) { const gchar *tag = child->getRepr()->name(); - if (!strcmp(tag, "svg:defs")) { - for ( SPObject *x = child->firstChild(); x; x = x->getNext() ) { - in_defs->getRepr()->addChild(x->getRepr()->duplicate(xml_in_doc), last_def); - } - } - else if (!strcmp(tag, "svg:style")) { + if (!strcmp(tag, "svg:style")) { in_doc->getRoot()->appendChildRepr(child->getRepr()->duplicate(xml_in_doc)); } } |
