summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc.jeanmougin@telecom-paristech.fr>2018-09-09 10:26:06 +0000
committerMarc Jeanmougin <marc.jeanmougin@telecom-paristech.fr>2018-09-09 10:26:06 +0000
commitfb1b3bda32bf215d9734b0b79d7882e93041f7a5 (patch)
treeed67c0cea116d19c6bb0202651c085fc34515e8c /src/file.cpp
parentMove extensions to git inkscape-extensions repository (diff)
downloadinkscape-fb1b3bda32bf215d9734b0b79d7882e93041f7a5.tar.gz
inkscape-fb1b3bda32bf215d9734b0b79d7882e93041f7a5.zip
copypaste bugfix
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp14
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()) {