summaryrefslogtreecommitdiffstats
path: root/src/sp-item-group.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2006-12-13 20:42:26 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2006-12-13 20:42:26 +0000
commitb61da19ac7e48712fb1c66d2142fd08686ef1238 (patch)
treea9f3feaaf1ce63278689c42bd899a96cf7d01be7 /src/sp-item-group.cpp
parentFIXED BUG [ 1612814 ]: Guides and gridlines vanish on corresp. alpha value ch... (diff)
downloadinkscape-b61da19ac7e48712fb1c66d2142fd08686ef1238.tar.gz
inkscape-b61da19ac7e48712fb1c66d2142fd08686ef1238.zip
Fixed ungrouping bug where the changed transformation of items was not written to XML.
(bzr r2090)
Diffstat (limited to 'src/sp-item-group.cpp')
-rw-r--r--src/sp-item-group.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index ba96ed0d1..5cbf68fff 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -6,8 +6,9 @@
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
*
- * Copyright (C) 1999-2005 authors
+ * Copyright (C) 1999-2006 authors
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
@@ -428,22 +429,8 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done)
// fill in the children list if non-null
SPItem *item = (SPItem *) doc->getObjectByRepr(repr);
- /* Optimize the transform matrix if requested. */
- // No compensations are required because this is supposed to be a non-transformation visually.
- // FIXME: this if is wholly lifted from sp_item_write_transform and should stay in sync
- NR::Matrix transform_attr (item->transform);
- if ( // run the object's set_transform (i.e. embed transform) only if:
- ((SPItemClass *) G_OBJECT_GET_CLASS(item))->set_transform && // it does have a set_transform method
- !preserve && // user did not chose to preserve all transforms
- !item->clip_ref->getObject() && // the object does not have a clippath
- !item->mask_ref->getObject() && // the object does not have a mask
- !(!transform_attr.is_translation() && SP_OBJECT_STYLE(item) && SP_OBJECT_STYLE(item)->filter.filter)
- // the object does not have a filter, or the transform is translation (which is supposed to not affect filters)
- ) {
- transform_attr = ((SPItemClass *) G_OBJECT_GET_CLASS(item))->set_transform(item, item->transform);
- }
- sp_item_set_item_transform(item, transform_attr);
-
+ sp_item_write_transform(item, repr, item->transform, NULL, false);
+
Inkscape::GC::release(repr);
if (children && SP_IS_ITEM (item))
*children = g_slist_prepend (*children, item);