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/ui | |
| 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/ui')
| -rw-r--r-- | src/ui/clipboard.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 2f0cc2bbb..65a704278 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -760,15 +760,17 @@ void ClipboardManagerImpl::_copySelection(ObjectSet *selection) // 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) + SPUse *use=dynamic_cast<SPUse *>(item); - if( use && use->get_original() && use->get_original()->parent ){//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); + if( use && use->get_original() && use->get_original()->parent) { + if (selection->includes(use->get_original())){ //we are copying something whose parent is also copied (!) + obj_copy->setAttribute("transform", sp_svg_transform_write( ((SPItem*)(use->get_original()->parent))->i2doc_affine().inverse() * transform)); + } else { // original is not copied + obj_copy->setAttribute("transform-with-parent", sp_svg_transform_write(transform)); + obj_copy->setAttribute("transform", sp_svg_transform_write( ((SPItem*)(use->get_original()->parent))->i2doc_affine().inverse() * transform)); + } + } else + obj_copy->setAttribute("transform", sp_svg_transform_write(transform)); } } |
