diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-06-14 10:39:11 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-06-14 10:39:11 +0000 |
| commit | a1d971856661b0655ed798941195f100aadf3dc4 (patch) | |
| tree | e48a77cea5a6665149e2cbed8c0eb843e0a264c2 /src | |
| parent | Do not allow markers for children of markers (prevent loop) (diff) | |
| download | inkscape-a1d971856661b0655ed798941195f100aadf3dc4.tar.gz inkscape-a1d971856661b0655ed798941195f100aadf3dc4.zip | |
Allow svg elements to be ungrouped
Fixed bugs:
- https://launchpad.net/bugs/166327
(bzr r12373)
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection-chemistry.cpp | 6 | ||||
| -rw-r--r-- | src/sp-item-group.cpp | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index cd0001175..0fea43e30 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -784,8 +784,10 @@ void sp_selection_ungroup(SPDesktop *desktop) continue; } - /* We do not allow ungrouping <svg> etc. (lauris) */ - if (strcmp(group->getRepr()->name(), "svg:g") && strcmp(group->getRepr()->name(), "svg:switch")) { + // This check reflects the g_return_if_fail in sp_item_group_ungroup and + // may be a redundent. It also allows ungrouping of 'a' tags and we dont + if (strcmp(group->getRepr()->name(), "svg:g") && strcmp(group->getRepr()->name(), "svg:switch") && + strcmp(group->getRepr()->name(), "svg:svg")) { // keep the non-group item in the new selection new_select = g_slist_append(new_select, group); continue; diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 3ba1ecd5f..a2eda6625 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -324,7 +324,10 @@ sp_item_group_ungroup (SPGroup *group, GSList **children, bool do_done) SPItem *gitem = group; Inkscape::XML::Node *grepr = gitem->getRepr(); - g_return_if_fail (!strcmp (grepr->name(), "svg:g") || !strcmp (grepr->name(), "svg:a") || !strcmp (grepr->name(), "svg:switch")); + g_return_if_fail (!strcmp (grepr->name(), "svg:g") + || !strcmp (grepr->name(), "svg:a") + || !strcmp (grepr->name(), "svg:switch") + || !strcmp (grepr->name(), "svg:svg")); // this converts the gradient/pattern fill/stroke on the group, if any, to userSpaceOnUse gitem->adjust_paint_recursive (Geom::identity(), Geom::identity(), false); |
