diff options
| author | Alexander Brock <zaibu@lunar-orbit.de> | 2016-11-04 18:17:12 +0000 |
|---|---|---|
| committer | Alexander Brock <zaibu@lunar-orbit.de> | 2016-11-04 18:17:12 +0000 |
| commit | f5a7ab4571dd994c1b02ab774b48a7bb5d61dd8f (patch) | |
| tree | bfd1651c1924c9417a493a37d5078ab3b081f7c8 /src/selection-chemistry.cpp | |
| parent | Preserve clips when unlinking clones (diff) | |
| download | inkscape-f5a7ab4571dd994c1b02ab774b48a7bb5d61dd8f.tar.gz inkscape-f5a7ab4571dd994c1b02ab774b48a7bb5d61dd8f.zip | |
Make ObjectSet::unlink() work for clones which are both clipped and masked
(bzr r15204.1.3)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
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 { |
