diff options
| author | Ted Gould <ted@gould.cx> | 2010-07-13 20:16:51 +0000 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2010-07-13 20:16:51 +0000 |
| commit | ef2d72d29fce61231bdd7888ab8330503158e9d6 (patch) | |
| tree | 4685bfddef010181fdd87fc182016b994f2b69d9 /src/live_effects/lpeobject.cpp | |
| parent | Pulling in a more recent trunk (diff) | |
| parent | Translations. Romanian nsh file update. (diff) | |
| download | inkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.tar.gz inkscape-ef2d72d29fce61231bdd7888ab8330503158e9d6.zip | |
Upgrading to trunk
(bzr r8254.1.57)
Diffstat (limited to 'src/live_effects/lpeobject.cpp')
| -rw-r--r-- | src/live_effects/lpeobject.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp index ec0dee0be..aa916318d 100644 --- a/src/live_effects/lpeobject.cpp +++ b/src/live_effects/lpeobject.cpp @@ -245,6 +245,7 @@ livepatheffect_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/, /** * If this has other users, create a new private duplicate and return it * returns 'this' when no forking was necessary (and therefore no duplicate was made) + * Check out sp_lpe_item_fork_path_effects_if_necessary ! */ LivePathEffectObject * LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users) @@ -252,11 +253,12 @@ LivePathEffectObject::fork_private_if_necessary(unsigned int nr_of_allowed_users if (SP_OBJECT_HREFCOUNT(this) > nr_of_allowed_users) { SPDocument *doc = SP_OBJECT_DOCUMENT(this); Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); + Inkscape::XML::Node *dup_repr = SP_OBJECT_REPR (this)->duplicate(xml_doc); - Inkscape::XML::Node *repr = SP_OBJECT_REPR (this)->duplicate(xml_doc); - SP_OBJECT_REPR (SP_DOCUMENT_DEFS (doc))->addChild(repr, NULL); - LivePathEffectObject *lpeobj_new = (LivePathEffectObject *) doc->getObjectByRepr(repr); - Inkscape::GC::release(repr); + SP_OBJECT_REPR (SP_DOCUMENT_DEFS (doc))->addChild(dup_repr, NULL); + LivePathEffectObject *lpeobj_new = LIVEPATHEFFECT( doc->getObjectByRepr(dup_repr) ); + + Inkscape::GC::release(dup_repr); return lpeobj_new; } return this; |
