diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2006-09-30 16:29:24 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2006-09-30 16:29:24 +0000 |
| commit | 747ec2c063a1a8bf938b45a6e9674ec85ab4d99c (patch) | |
| tree | bc793b3d641876c08a2a79b1ca953049af0d14c4 /src/splivarot.cpp | |
| parent | fixed bug: fixed two of the 'quark > 0' console errors. (diff) | |
| download | inkscape-747ec2c063a1a8bf938b45a6e9674ec85ab4d99c.tar.gz inkscape-747ec2c063a1a8bf938b45a6e9674ec85ab4d99c.zip | |
Patch by Popolon to fix bug "[ 1562520 ] Object to path removes mask & clip-path"
(bzr r1729)
Diffstat (limited to 'src/splivarot.cpp')
| -rw-r--r-- | src/splivarot.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 2fd01cb69..242cf3a24 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -1408,6 +1408,8 @@ sp_selected_path_simplify_item(SPDesktop *desktop, sp_item_write_transform(item, SP_OBJECT_REPR(item), NR::identity()); gchar *style = g_strdup(SP_OBJECT_REPR(item)->attribute("style")); + gchar *mask = g_strdup(SP_OBJECT_REPR(item)->attribute("mask")); + gchar *clip_path = g_strdup(SP_OBJECT_REPR(item)->attribute("clip-path")); Path *orig = Path_for_item(item, false); if (orig == NULL) { @@ -1439,8 +1441,21 @@ sp_selected_path_simplify_item(SPDesktop *desktop, Inkscape::XML::Node *repr = sp_repr_new("svg:path"); + // restore style, mask and clip-path repr->setAttribute("style", style); + g_free(style); + + if ( mask ) { + repr->setAttribute("mask", mask); + g_free(mask); + } + + if ( clip_path ) { + repr->setAttribute("clip-path", clip_path); + g_free(clip_path); + } + // path gchar *str = orig->svg_dump_path(); repr->setAttribute("d", str); g_free(str); |
