diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-08-20 11:48:43 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-08-20 11:48:43 +0000 |
| commit | c8b00b1e5db4cbb22e180b75efaa529cc7605c9a (patch) | |
| tree | 687467adc01bccccd7121d743a66b2d7c655e787 | |
| parent | UI. Fix for Bug #1485831 (Preview of bitmap image in file chooser no longer d... (diff) | |
| download | inkscape-c8b00b1e5db4cbb22e180b75efaa529cc7605c9a.tar.gz inkscape-c8b00b1e5db4cbb22e180b75efaa529cc7605c9a.zip | |
small fix for pasting svg that were not copied in inkscape
Fixed bugs:
- https://launchpad.net/bugs/1486927
(bzr r14311)
| -rw-r--r-- | src/file.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp index ed9caacf1..7ae7d238a 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1068,7 +1068,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) // copy definitions desktop->doc()->importDefs(clipdoc); - Inkscape::XML::Node* clipboard; + Inkscape::XML::Node* clipboard = NULL; // copy objects std::vector<Inkscape::XML::Node*> pasted_objects; for (Inkscape::XML::Node *obj = root->firstChild() ; obj ; obj = obj->next()) { @@ -1100,6 +1100,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) * */ std::vector<Inkscape::XML::Node*> pasted_objects_not; + if(clipboard) for (Inkscape::XML::Node *obj = clipboard->firstChild() ; obj ; obj = obj->next()) { if(target_document->getObjectById(obj->attribute("id"))) continue; Inkscape::XML::Node *obj_copy = obj->duplicate(target_document->getReprDoc()); |
