diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-05-16 09:18:40 +0000 |
|---|---|---|
| committer | Jabiertxof <jabier.arraiza@marker.es> | 2019-05-16 09:18:40 +0000 |
| commit | ce67a5f751e7dae96f135e9003a77665ef0f5e61 (patch) | |
| tree | ebd6dc91b49f54f3f39dd6751febc66319d88f1a /src/object/sp-lpe-item.cpp | |
| parent | Add new mode to Clone LPE to allow custom clones locked. Also fix to handle S... (diff) | |
| download | inkscape-ce67a5f751e7dae96f135e9003a77665ef0f5e61.tar.gz inkscape-ce67a5f751e7dae96f135e9003a77665ef0f5e61.zip | |
Fork LPE if necesary also in LPEItem childs
Diffstat (limited to 'src/object/sp-lpe-item.cpp')
| -rwxr-xr-x | src/object/sp-lpe-item.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index f3dd5f05b..b43a0b926 100755 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -1152,9 +1152,19 @@ void SPLPEItem::replacePathEffects( std::vector<LivePathEffectObject const *> co * use this method instead. * Returns true if one or more effects were forked; returns false if nothing was done. */ -bool SPLPEItem::forkPathEffectsIfNecessary(unsigned int nr_of_allowed_users) +bool SPLPEItem::forkPathEffectsIfNecessary(unsigned int nr_of_allowed_users, bool recursive) { bool forked = false; + SPGroup * group = dynamic_cast<SPGroup *>(this); + if (group && recursive) { + std::vector<SPItem*> item_list = sp_item_group_item_list(group); + for (auto child:item_list) { + SPLPEItem *lpeitem = dynamic_cast<SPLPEItem *>(child); + if (lpeitem && lpeitem->forkPathEffectsIfNecessary(nr_of_allowed_users, recursive)) { + forked = true; + } + } + } if ( this->hasPathEffect() ) { // If one of the path effects is used by 2 or more items, fork it |
