summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2010-06-01 21:17:09 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2010-06-01 21:17:09 +0000
commit21821f40a5af994fbc77babb135fcc6b141fc297 (patch)
treee77edb36f29281bf5a5467b3756c03ca2f648475 /src
parentFlowed text does not support dx (kerning), dy, and rotation attributes. (diff)
downloadinkscape-21821f40a5af994fbc77babb135fcc6b141fc297.tar.gz
inkscape-21821f40a5af994fbc77babb135fcc6b141fc297.zip
i think this is the final fix for the LPE forking bug with clones.
Fixed bugs: - https://launchpad.net/bugs/578969 (bzr r9469)
Diffstat (limited to 'src')
-rw-r--r--src/sp-lpe-item.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 77b2db6f6..71352ed98 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -814,6 +814,10 @@ bool sp_lpe_item_fork_path_effects_if_necessary(SPLPEItem *lpeitem, unsigned int
// so that each object has its own independent copy of the effect.
// Note: replacing path effects messes up the path effect list
+ // Clones of the LPEItem will increase the refcount of the lpeobjects.
+ // Therefore, nr_of_allowed_users should be increased with the number of clones (i.e. refs to the lpeitem)
+ nr_of_allowed_users += SP_OBJECT(lpeitem)->hrefcount;
+
std::vector<LivePathEffectObject const *> old_lpeobjs, new_lpeobjs;
PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem);
for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++)