From 2f08c2af203444acbea58eb5f521013780626ee5 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 16 Aug 2015 21:11:47 +0200 Subject: fix for ungrouping dynamic offset displacement bug Fixed bugs: - https://launchpad.net/bugs/844909 (bzr r14305) --- src/sp-item-group.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/sp-item-group.cpp') diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 72cd5d7fa..5d96899b1 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -465,7 +465,7 @@ sp_item_group_ungroup (SPGroup *group, std::vector &children, bool do_d Inkscape::XML::Node *nrepr = child->getRepr()->duplicate(prepr->document()); // Merging transform - Geom::Affine ctrans; + Geom::Affine ctrans = citem->transform * g; // We should not apply the group's transformation to both a linked offset AND to its source if (dynamic_cast(citem)) { // Do we have an offset at hand (whether it's dynamic or linked)? SPItem *source = sp_offset_get_source(dynamic_cast(citem)); @@ -476,13 +476,9 @@ sp_item_group_ungroup (SPGroup *group, std::vector &children, bool do_d source = sp_offset_get_source(dynamic_cast(source)); } if (source != NULL && // If true then we must be dealing with a linked offset ... - group->isAncestorOf(source) == false) { // ... of which the source is not in the same group - ctrans = citem->transform * g; // then we should apply the transformation of the group to the offset - } else { - ctrans = citem->transform; + group->isAncestorOf(source) ) { // ... of which the source is in the same group + ctrans = citem->transform; // then we should apply the transformation of the group to the offset } - } else { - ctrans = citem->transform * g; } // FIXME: constructing a transform that would fully preserve the appearance of a -- cgit v1.2.3