diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-08-17 14:58:39 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-08-17 14:58:39 +0000 |
| commit | 2286e96fb2d97298adf9920902babc522dc80b66 (patch) | |
| tree | 35063233ff3676c4df7def81bf7a7adc4b235eef /src/selection-chemistry.cpp | |
| parent | Clone Original -> Fill Between Many (diff) | |
| parent | Update to trunk r13525 (diff) | |
| download | inkscape-2286e96fb2d97298adf9920902babc522dc80b66.tar.gz inkscape-2286e96fb2d97298adf9920902babc522dc80b66.zip | |
Update to experimental r13483
(bzr r13090.1.105)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 33279c0e7..7c614a581 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1466,7 +1466,7 @@ value of set_i2d==false is only used by seltrans when it's dragging objects live that case, items are already in the new position, but the repr is in the old, and this function then simply updates the repr from item->transform. */ -void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine const &affine, bool set_i2d, bool compensate) +void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine const &affine, bool set_i2d, bool compensate, bool adjust_transf_center) { if (selection->isEmpty()) return; @@ -1621,14 +1621,13 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons item->doWriteTransform(item->getRepr(), item->transform, NULL, compensate); } - // if we're transforming the actual object, not just updating the repr, we can transform the - // center by the same matrix (only necessary for non-translations) - if (set_i2d && item->isCenterSet() && !(affine.isTranslation() || affine.isIdentity())) { - // If there's a viewbox, we might have an affine with a translation component; - // we will only apply the scaling/skewing components, not the translations - // because otherwise the center will move relative to the item - item->setCenter(old_center * affine.withoutTranslation()); - item->updateRepr(); + if (adjust_transf_center) { // The transformation center should not be touched in case of pasting or importing, which is allowed by this if clause + // if we're moving the actual object, not just updating the repr, we can transform the + // center by the same matrix (only necessary for non-translations) + if (set_i2d && item->isCenterSet() && !(affine.isTranslation() || affine.isIdentity())) { + item->setCenter(old_center * affine); + item->updateRepr(); + } } } } |
