summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2010-05-18 19:17:03 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2010-05-18 19:17:03 +0000
commit4118824234670a01ef4caad683817567ea84e6ae (patch)
tree2d5e4389d81a91e4d9e5e18e5e50db3814c87714 /src/sp-item.cpp
parentKeys. gdkkeysyms.h URL correction (Bug #528884). (diff)
downloadinkscape-4118824234670a01ef4caad683817567ea84e6ae.tar.gz
inkscape-4118824234670a01ef4caad683817567ea84e6ae.zip
better fix for lpe stack forking
Fixed bugs: - https://launchpad.net/bugs/578969 (bzr r9431)
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index d6f68fc74..5a2dfb2f0 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -1377,27 +1377,7 @@ sp_item_adjust_livepatheffect (SPItem *item, Geom::Matrix const &postmul, bool s
SPLPEItem *lpeitem = SP_LPE_ITEM (item);
if ( sp_lpe_item_has_path_effect(lpeitem) ) {
- // If one of the path effects is used by 2 or more items, fork it
- // so that each object has its own independent copy of the effect.
- // Forking messes up the path effect list, so after each fork,
- // reload the list and recheck if more forking is required.
- bool forked = false;
- do {
- forked = false;
- PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem);
- for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++)
- {
- LivePathEffectObject *lpeobj = (*it)->lpeobject;
- if (lpeobj) {
- LivePathEffectObject *new_lpeobj = lpeobj->fork_private_if_necessary();
- if (new_lpeobj != lpeobj) {
- sp_lpe_item_replace_path_effect(lpeitem, lpeobj, new_lpeobj);
- forked = true;
- break; // forked, so break the for-loop and recheck
- }
- }
- }
- } while (forked);
+ sp_lpe_item_fork_path_effects_if_necessary(lpeitem);
// now that all LPEs are forked_if_necessary, we can apply the transform
PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem);