summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-07-19 21:22:12 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-07-19 21:22:12 +0000
commitdb8282d8518263885625d9c19aefad1bdbb175d4 (patch)
tree911a397de0ac4588c2475e6bc3d9310ad3e92d2a /src/selection-chemistry.cpp
parentupdate to trunk (r13425) (diff)
parentWarnings cleaup. (diff)
downloadinkscape-db8282d8518263885625d9c19aefad1bdbb175d4.tar.gz
inkscape-db8282d8518263885625d9c19aefad1bdbb175d4.zip
update to trunk (r13454)
(bzr r13398.1.4)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index a350dd7a7..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();
}
}
@@ -3950,10 +3953,6 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
for ( SPObject *child = obj->firstChild() ; child; child = child->getNext() ) {
// Collect all clipped paths and masks within a single group
Inkscape::XML::Node *copy = SP_OBJECT(child)->getRepr()->duplicate(xml_doc);
- if(copy->attribute("inkscape:original-d"))
- {
- copy->setAttribute("d", copy->attribute("inkscape:original-d"));
- }
items_to_move = g_slist_prepend(items_to_move, copy);
}