From 95b1c7b549605d7c6ce6623cc4cd121ed7c51a64 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 3 Mar 2018 01:12:41 +0100 Subject: Base LPE refactor --- src/selection-chemistry.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index ae2f63f97..622a843e4 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -771,10 +771,6 @@ Inkscape::XML::Node* ObjectSet::group() { group->setPosition(topmost + 1); set(doc->getObjectByRepr(group)); - SPLPEItem *lpeitem = dynamic_cast(*(items().begin())); - if (lpeitem) { - sp_lpe_item_update_patheffect(lpeitem, true, true); - } DocumentUndo::done(doc, SP_VERB_SELECTION_GROUP, C_("Verb", "Group")); @@ -4155,9 +4151,14 @@ void ObjectSet::unsetMask(const bool apply_clip_path, const bool skip_undo) { for (auto& child: obj->children) { // Collect all clipped paths and masks within a single group Inkscape::XML::Node *copy = child.getRepr()->duplicate(xml_doc); - if(copy->attribute("inkscape:original-d") && copy->attribute("inkscape:path-effect")) - { + if (copy->attribute("inkscape:original-d") && copy->attribute("inkscape:path-effect")) { copy->setAttribute("d", copy->attribute("inkscape:original-d")); + } else if (copy->attribute("inkscape:original-d")) { + copy->setAttribute("d", copy->attribute("inkscape:original-d")); + copy->setAttribute("inkscape:original-d", NULL); + } else if (!copy->attribute("inkscape:path-effect") && !SP_IS_PATH(&child)) { + copy->setAttribute("d", NULL); + copy->setAttribute("inkscape:original-d", NULL); } items_to_move.push_back(copy); } @@ -4204,7 +4205,6 @@ void ObjectSet::unsetMask(const bool apply_clip_path, const bool skip_undo) { // rebuild selection addList(items_to_select); - if (!skip_undo) { if (apply_clip_path) { DocumentUndo::done(doc, SP_VERB_OBJECT_UNSET_CLIPPATH, _("Release clipping path")); -- cgit v1.2.3