diff options
| author | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-21 01:06:20 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-21 01:06:20 +0000 |
| commit | e0577d6bc840d0e8f6f9d3cb20c2a93112b1c950 (patch) | |
| tree | 1d6c5b0c291875c0de406cefaae40d0ed14d3e84 /src/ui/clipboard.cpp | |
| parent | packaging: Add LP script to close bug reports (diff) | |
| download | inkscape-e0577d6bc840d0e8f6f9d3cb20c2a93112b1c950.tar.gz inkscape-e0577d6bc840d0e8f6f9d3cb20c2a93112b1c950.zip | |
Fixes bug 1152657: "Paste selection with original+clone(s): Wrong placement between original and clones"
Fixed bugs:
- https://launchpad.net/bugs/1152657
(bzr r13932)
Diffstat (limited to 'src/ui/clipboard.cpp')
| -rw-r--r-- | src/ui/clipboard.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 94a1eb2dc..5802a1be3 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -685,10 +685,18 @@ void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection) sp_repr_css_set(obj_copy, css, "style"); sp_repr_css_attr_unref(css); + Geom::Affine transform=item->i2doc_affine(); + // write the complete accumulated transform passed to us // (we're dealing with unattached representations, so we write to their attributes // instead of using sp_item_set_transform) - gchar *transform_str = sp_svg_transform_write(item->i2doc_affine()); + SPUse *use=dynamic_cast<SPUse *>(item); + 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; + } + gchar *transform_str = sp_svg_transform_write(transform ); + + obj_copy->setAttribute("transform", transform_str); g_free(transform_str); } |
