diff options
| author | Martin Owens <doctormo@gmail.com> | 2018-09-10 15:57:11 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2018-09-10 15:57:11 +0000 |
| commit | 88d8b781054039704afb495845c536d389afb3cb (patch) | |
| tree | 228a8075a36d520f92b491e95d2f0f0a5623733b /src/file.cpp | |
| parent | Fix bug #167900 (diff) | |
| parent | CMake: Install extensions after switch to submodule (diff) | |
| download | inkscape-88d8b781054039704afb495845c536d389afb3cb.tar.gz inkscape-88d8b781054039704afb495845c536d389afb3cb.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape into yhoshi/inkscape-bug167900
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/file.cpp b/src/file.cpp index d32d104ac..48218e617 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1093,14 +1093,16 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) Inkscape::GC::release(obj_copy); pasted_objects.push_back(obj_copy); + + // if we are pasting a clone to an already existing object, its + // transform is wrong (see ui/clipboard.cpp) + if(obj_copy->attribute("transform-with-parent") && target_document->getObjectById(obj->attribute("xlink:href")+1) ){ + obj_copy->setAttribute("transform",obj_copy->attribute("transform-with-parent")); + } + if(obj_copy->attribute("transform-with-parent")) + obj_copy->setAttribute("transform-with-parent", nullptr); } - /* take that stuff into account: - * if( use && selection->includes(use->get_original()) ){//we are copying something whose parent is also copied (!) - * transform = ((SPItem*)(use->get_original()->parent))->i2doc_affine().inverse() * transform; - * } - * - */ std::vector<Inkscape::XML::Node*> pasted_objects_not; if(clipboard) for (Inkscape::XML::Node *obj = clipboard->firstChild() ; obj ; obj = obj->next()) { |
