diff options
| author | Xortex <sambut1987@gmail.com> | 2018-09-19 17:55:41 +0000 |
|---|---|---|
| committer | Xortex <sambut1987@gmail.com> | 2018-09-19 17:55:41 +0000 |
| commit | 68e10c785672926aab15960678ca63625f843300 (patch) | |
| tree | 4400a8e0305528494deb7608a14138865aaba4f5 | |
| parent | Fix build (diff) | |
| download | inkscape-68e10c785672926aab15960678ca63625f843300.tar.gz inkscape-68e10c785672926aab15960678ca63625f843300.zip | |
fix bug 1791694
| -rwxr-xr-x[-rw-r--r--] | src/object/sp-lpe-item.cpp | 19 | ||||
| -rwxr-xr-x | src/selection-chemistry.cpp | 9 |
2 files changed, 9 insertions, 19 deletions
diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index d6eaf7b6e..819bc7a58 100644..100755 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -947,25 +947,6 @@ SPLPEItem::applyToClipPathOrMask(SPItem *clip_mask, SPItem* to, Inkscape::LivePa shape->setAttribute("inkscape:original-d", nullptr); } else { SPCurve * c = nullptr; - // If item is a SPRect, convert it to path first: - if ( dynamic_cast<SPRect *>(shape) ) { - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (desktop) { - Inkscape::Selection *sel = desktop->getSelection(); - if ( sel && !sel->isEmpty() ) { - sel->clear(); - sel->add(SP_ITEM(shape)); - sel->toCurves(); - SPItem* item = sel->singleItem(); - shape = dynamic_cast<SPShape *>(item); - if (!shape) { - return; - } - sel->clear(); - sel->add(this); - } - } - } c = shape->getCurve(); if (c) { bool success = false; diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index b2a54244a..402fab372 100755 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -3951,6 +3951,15 @@ void ObjectSet::setClipGroup() sort(items_.begin(),items_.end(),sp_object_compare_position_bool); + //convert any rects to paths + for (std::vector<SPItem*>::const_iterator i = items_.begin(); i != items_.end(); ++i) { + clear(); + if (dynamic_cast<SPRect *>(*i)) { + add(*i); + toCurves(); + } + } + // See lp bug #542004 clear(); |
