diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-28 22:45:49 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-09-28 22:45:49 +0000 |
| commit | 6d3682c7c8daacee95364d5d80a4490786235a45 (patch) | |
| tree | b4149058bc1d69fbf8cd3f7b02cd21d4aa2e904e /src/selection-chemistry.cpp | |
| parent | fix 1789208 poppler 0.69 (diff) | |
| download | inkscape-6d3682c7c8daacee95364d5d80a4490786235a45.tar.gz inkscape-6d3682c7c8daacee95364d5d80a4490786235a45.zip | |
Fix bug #1791696: PowerClip: Using a group as a clip doesn't work as expected
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rwxr-xr-x | src/selection-chemistry.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 30a1e8e19..6584244c2 100755 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -3947,19 +3947,29 @@ void ObjectSet::setClipGroup() doc->ensureUpToDate(); + // Coment this section because we dont need it I think. + // Also updated comment code to work correctly if finaly is needed + // To active again remove next line and uncoment the section std::vector<SPItem*> items_(items().begin(), items().end()); - - sort(items_.begin(),items_.end(),sp_object_compare_position_bool); + /* + std::vector<SPItem*> items_prerect_(items().begin(), items().end()); + std::vector<SPItem*> items_; // convert any rects to paths - for (std::vector<SPItem *>::const_iterator i = items_.begin(); i != items_.end(); ++i) { + for (std::vector<SPItem *>::const_iterator i = items_prerect_.begin(); i != items_prerect_.end(); ++i) { clear(); if (dynamic_cast<SPRect *>(*i)) { add(*i); toCurves(); + items_.push_back(*items().begin()); + } else { + items_.push_back(*i); } } - + clear(); + */ + sort(items_.begin(),items_.end(),sp_object_compare_position_bool); + // See lp bug #542004 clear(); @@ -4030,7 +4040,6 @@ void ObjectSet::setClipGroup() gchar const *attributeName = apply_clip_path ? "clip-path" : "mask"; for (std::vector<SPItem*>::const_reverse_iterator i = apply_to_items.rbegin(); i != apply_to_items.rend(); ++i) { SPItem *item = reinterpret_cast<SPItem *>(*i); - std::vector<Inkscape::XML::Node*> mask_items_dup; std::map<Inkscape::XML::Node*, Geom::Affine> dup_transf; for (auto it = mask_items.begin(); it != mask_items.end(); ++it) { @@ -4059,7 +4068,7 @@ void ObjectSet::setClipGroup() // Apply clip/mask to group instead apply_mask_to = group; - items_to_select.push_back(item = (SPItem*)(doc->getObjectByRepr(group))); + items_to_select.push_back((SPItem*)doc->getObjectByRepr(group)); Inkscape::GC::release(spnew); Inkscape::GC::release(group); } |
