From: johanengelen Date: Mon, 16 Jun 2008 16:09:45 +0000 (+0000) Subject: copy complete LPE stack to clipboard instead of only the current active lpe X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1a47b2cac3a626601cae7f54072e4428312d913d;p=inkscape.git copy complete LPE stack to clipboard instead of only the current active lpe --- diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 8907b3b0c..f7967bd40 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -595,14 +595,15 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item) } } } - // For lpe items, copy liveeffect if applicable - // TODO: copy the whole effect stack. now it only copies current selected effect + // For lpe items, copy lpe stack if applicable if (SP_IS_LPE_ITEM(item)) { SPLPEItem *lpeitem = SP_LPE_ITEM (item); if (sp_lpe_item_has_path_effect(lpeitem)) { - Inkscape::LivePathEffect::LPEObjectReference* lperef = sp_lpe_item_get_current_lpereference(lpeitem); - if (lperef && lperef->lpeobject) { - _copyNode(SP_OBJECT_REPR(SP_OBJECT(lperef->lpeobject)), _doc, _defs); + for (PathEffectList::iterator it = lpeitem->path_effect_list->begin(); it != lpeitem->path_effect_list->end(); ++it) + { + LivePathEffectObject *lpeobj = (*it)->lpeobject; + if (lpeobj) + _copyNode(SP_OBJECT_REPR(SP_OBJECT(lpeobj)), _doc, _defs); } } }