~liampwhite/inkscape/libinkobjects-a

« back to all changes in this revision

Viewing changes to src/ui/clipboard.cpp

  • Committer: Marc Jeanmougin
  • Date: 2015-02-21 01:06:20 UTC
  • Revision ID: mc@localhost.localdomain-20150221010620-ekx9q7gkvti60ste
Fixes bug 1152657:  "Paste selection with original+clone(s): Wrong placement between original and clones"

Show diffs side-by-side

added added

removed removed

Lines of Context:
685
685
            sp_repr_css_set(obj_copy, css, "style");
686
686
            sp_repr_css_attr_unref(css);
687
687
 
 
688
            Geom::Affine transform=item->i2doc_affine();
 
689
 
688
690
            // write the complete accumulated transform passed to us
689
691
            // (we're dealing with unattached representations, so we write to their attributes
690
692
            // instead of using sp_item_set_transform)
691
 
            gchar *transform_str = sp_svg_transform_write(item->i2doc_affine());
 
693
            SPUse *use=dynamic_cast<SPUse *>(item);
 
694
            if( use && selection->includes(use->get_original()) ){//we are copying something whose parent is also copied (!)
 
695
                transform = ((SPItem*)(use->get_original()->parent))->i2doc_affine().inverse() * transform;
 
696
            }
 
697
            gchar *transform_str = sp_svg_transform_write(transform );
 
698
 
 
699
 
692
700
            obj_copy->setAttribute("transform", transform_str);
693
701
            g_free(transform_str);
694
702
        }