summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-07-27 01:17:50 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-07-27 01:17:50 +0000
commit0ac6f5cccf5aaa8bb8d97fdf96d040646b7056c1 (patch)
treef3f00d4c95db349232b1e201fd2e45118d511f6e /src/selection-chemistry.cpp
parentFix for 1309050 (diff)
parentProperly fix 1309050, revert incorrect fix for 601336 (diff)
downloadinkscape-0ac6f5cccf5aaa8bb8d97fdf96d040646b7056c1.tar.gz
inkscape-0ac6f5cccf5aaa8bb8d97fdf96d040646b7056c1.zip
Merge from trunk 13472
(bzr r13341.1.102)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 868a9d743..f058189d3 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -1621,10 +1621,13 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
item->doWriteTransform(item->getRepr(), item->transform, NULL, compensate);
}
- // if we're moving the actual object, not just updating the repr, we can transform the
+ // 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())) {
- item->setCenter(old_center * affine);
+ // 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();
}
}