From f5a7ab4571dd994c1b02ab774b48a7bb5d61dd8f Mon Sep 17 00:00:00 2001 From: Alexander Brock Date: Fri, 4 Nov 2016 19:17:12 +0100 Subject: Make ObjectSet::unlink() work for clones which are both clipped and masked (bzr r15204.1.3) --- src/selection-chemistry.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 0b99fd7c4..dbad56b13 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2671,25 +2671,18 @@ bool ObjectSet::unlink(const bool skip_undo) ObjectSet tmp_set(document()); tmp_set.set(item); - bool has_clip = false; - bool has_mask = false; Inkscape::URIReference *clip = item->clip_ref; Inkscape::URIReference *mask = item->mask_ref; if ((NULL != clip) && (NULL != clip->getObject())) { tmp_set.unsetMask(true,true); - has_clip = true; + unlinked = tmp_set.unlink(true) || unlinked; + tmp_set.setMask(true,false,true); + new_select.push_back(tmp_set.singleItem()); } - if ((NULL != mask) && (NULL != mask->getObject())) { + else if ((NULL != mask) && (NULL != mask->getObject())) { tmp_set.unsetMask(false,true); - has_mask = true; - } - - if (has_mask || has_clip) { unlinked = tmp_set.unlink(true) || unlinked; - if (has_mask) - tmp_set.setMask(false,false,true); - if (has_clip) - tmp_set.setMask(true,false,true); + tmp_set.setMask(false,false,true); new_select.push_back(tmp_set.singleItem()); } else { -- cgit v1.2.3