summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-24 14:16:06 +0000
committerJabiertxof <jtx@jtx>2017-01-24 14:16:06 +0000
commitb25ebda10578c5d697db9716e3c2b70950d33e45 (patch)
tree4635b8b3f65600cfd54b5465b906ae42165b0674 /src/sp-object.cpp
parentFix some bugs (diff)
parentfix nodes reverting back during editing (diff)
downloadinkscape-b25ebda10578c5d697db9716e3c2b70950d33e45.tar.gz
inkscape-b25ebda10578c5d697db9716e3c2b70950d33e45.zip
fixing to new trunk
(bzr r15142.1.38)
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()) {