diff options
| author | Jasper van de Gronde <jasper.vandegronde@gmail.com> | 2008-04-12 09:32:03 +0000 |
|---|---|---|
| committer | jaspervdg <jaspervdg@users.sourceforge.net> | 2008-04-12 09:32:03 +0000 |
| commit | 32a388f5522ba0abb37d525c829d17b58a9077e4 (patch) | |
| tree | c613395f07e61b82e53bd23d15a22bbe9673ff0a /src/path-chemistry.cpp | |
| parent | Spiro splines LPE using code by Raph Levien (diff) | |
| download | inkscape-32a388f5522ba0abb37d525c829d17b58a9077e4.tar.gz inkscape-32a388f5522ba0abb37d525c829d17b58a9077e4.zip | |
Preserve transform of topmost object when combining paths (fixing bug 215255).
(bzr r5410)
Diffstat (limited to 'src/path-chemistry.cpp')
| -rw-r--r-- | src/path-chemistry.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index a08b6feb5..28538f36c 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -73,9 +73,10 @@ sp_selected_path_combine(void) items = g_slist_sort(items, (GCompareFunc) sp_item_repr_compare_position); items = g_slist_reverse(items); - // remember the position, id and style of the topmost path, they will be assigned to the combined one + // remember the position, id, transform and style of the topmost path, they will be assigned to the combined one gint position = 0; char const *id = NULL; + char const *transform = NULL; gchar *style = NULL; SPCurve* curve = 0; @@ -96,9 +97,10 @@ sp_selected_path_combine(void) parent = SP_OBJECT_REPR(first)->parent(); position = SP_OBJECT_REPR(first)->position(); id = SP_OBJECT_REPR(first)->attribute("id"); + transform = SP_OBJECT_REPR(first)->attribute("transform"); // FIXME: merge styles of combined objects instead of using the first one's style style = g_strdup(SP_OBJECT_REPR(first)->attribute("style")); - sp_curve_transform(c, item->transform); + //sp_curve_transform(c, item->transform); curve = c; } else { sp_curve_transform(c, item->getRelativeTransform(SP_OBJECT(first))); @@ -128,9 +130,9 @@ sp_selected_path_combine(void) Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); - // restore id and style + // restore id, transform and style repr->setAttribute("id", id); - + if (transform) repr->setAttribute("transform", transform); repr->setAttribute("style", style); g_free(style); |
