summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2017-01-10 17:55:52 +0000
committerShlomi Fish <shlomif@shlomifish.org>2017-01-10 17:55:52 +0000
commit92afc94301740d2caad74776778564af0c91ea31 (patch)
tree6b58c50b07abb97e28e730928401f36a4d6c0e89 /src/sp-object.cpp
parentMerged. (diff)
parentRemove debugging lines from last commit. (diff)
downloadinkscape-92afc94301740d2caad74776778564af0c91ea31.tar.gz
inkscape-92afc94301740d2caad74776778564af0c91ea31.zip
Merged.
(bzr r15369.1.16)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index e9c60fc7d..75f4657ef 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -660,7 +660,9 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) {
object->readAttr("xml:space");
object->readAttr("inkscape:label");
object->readAttr("inkscape:collect");
- if(object->cloned)
+ if(object->cloned && (repr->attribute("id")) ) // The cases where this happens are when the "original" has no id. This happens
+ // if it is a SPString (a TextNode, e.g. in a <title>), or when importing
+ // stuff externally modified to have no id.
object->clone_original = document->getObjectById(repr->attribute("id"));
for (Inkscape::XML::Node *rchild = repr->firstChild() ; rchild != NULL; rchild = rchild->next()) {