diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-10-27 00:01:14 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-10-27 00:01:14 +0000 |
| commit | 71f7e3e517b5d7f87d30a27b683c57df05ab5368 (patch) | |
| tree | 34e8796399dbb9cfa63a47a491fb37f51ce6b101 /src/sp-object.cpp | |
| parent | Prevent image drag/drop from grouping (diff) | |
| download | inkscape-71f7e3e517b5d7f87d30a27b683c57df05ab5368.tar.gz inkscape-71f7e3e517b5d7f87d30a27b683c57df05ab5368.zip | |
Fix regression in loop prevention
Fixed bugs:
- https://launchpad.net/bugs/1636533
(bzr r15193)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 21d8bcd93..8d4c4f0d1 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -119,7 +119,7 @@ static gchar *sp_object_get_unique_id(SPObject *object, * Constructor, sets all attributes to default values. */ SPObject::SPObject() - : cloned(0), uflags(0), mflags(0), hrefcount(0), _total_hrefcount(0), + : cloned(0), clone_original(NULL), uflags(0), mflags(0), hrefcount(0), _total_hrefcount(0), document(NULL), parent(NULL), id(NULL), repr(NULL), refCount(1), hrefList(std::list<SPObject*>()), _successor(NULL), _collection_policy(SPObject::COLLECT_WITH_PARENT), _label(NULL), _default_label(NULL) @@ -663,6 +663,8 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr("xml:space"); object->readAttr("inkscape:label"); object->readAttr("inkscape:collect"); + if(object->cloned) + object->clone_original = document->getObjectById(repr->attribute("id")); for (Inkscape::XML::Node *rchild = repr->firstChild() ; rchild != NULL; rchild = rchild->next()) { const std::string typeString = NodeTraits::get_type_string(*rchild); |
