summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-20 19:19:49 +0000
committerJabiertxof <jtx@jtx>2017-01-20 19:19:49 +0000
commit8907ced418b6c40782d2d2c0f3f944edcb3c08df (patch)
tree0cc230603662da9ac76d26b9a65467df9466e489 /src/file.cpp
parentFix bug 1622388. Insane memory leak and crash with pattern along path (diff)
downloadinkscape-8907ced418b6c40782d2d2c0f3f944edcb3c08df.tar.gz
inkscape-8907ced418b6c40782d2d2c0f3f944edcb3c08df.zip
Fixes bugs in copy LPE's. #1656093:Paste path effect doesn't work on 0.92 and #1656527:Copy & paste of group with shaped path corrupts it, in v0.92
Fixed bugs: - https://launchpad.net/bugs/1656093 - https://launchpad.net/bugs/1656527 (bzr r15426)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 9e96361c3..e8248bb8e 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1631,8 +1631,12 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
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());
- target_parent->appendChild(obj_copy);
+ SPObject * pasted = desktop->currentLayer()->appendChildRepr(obj_copy);
Inkscape::GC::release(obj_copy);
+ SPLPEItem * pasted_lpe_item = dynamic_cast<SPLPEItem *>(pasted);
+ if (pasted_lpe_item){
+ pasted_lpe_item->forkPathEffectsIfNecessary(1);
+ }
pasted_objects_not.push_back(obj_copy);
}
Inkscape::Selection *selection = desktop->getSelection();