summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-09-23 20:22:43 +0000
committerMarkus Engel <markus.engel@tum.de>2013-09-23 20:22:43 +0000
commitd07f7a584ecfbb026421dc2d3b9b984a696409f2 (patch)
tree3f0b170c0770c1273dc9017c3e97523a3305a6db /src/sp-object.cpp
parentBumping new version of libdepixelize (diff)
downloadinkscape-d07f7a584ecfbb026421dc2d3b9b984a696409f2.tar.gz
inkscape-d07f7a584ecfbb026421dc2d3b9b984a696409f2.zip
Added missing registration of FeDistantLight; made sure warnings on missing types are always issued.
Fixed bugs: - https://launchpad.net/bugs/1229326 (bzr r12580)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 8c7a24a2b..fa7d30dab 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -597,6 +597,7 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
ochild->invoke_build(object->document, child, object->cloned);
} catch (const FactoryExceptions::TypeNotRegistered& e) {
std::string node = e.what();
+
// special cases
if (node == "rdf:RDF") return; // no SP node yet
if (node == "inkscape:clipboard") return; // SP node not necessary
@@ -646,27 +647,20 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) {
object->readAttr("inkscape:collect");
for (Inkscape::XML::Node *rchild = repr->firstChild() ; rchild != NULL; rchild = rchild->next()) {
-// GType type = sp_repr_type_lookup(rchild);
-// if (!type) {
-// continue;
-// }
-// SPObject *child = SP_OBJECT(g_object_new(type, 0));
-
-// SPObject* child = SPFactory::instance().createObject(*rchild);
-// if (!child) {
-// continue;
-// }
-
try {
const std::string typeString = NodeTraits::get_type_string(*rchild);
+ // special cases
+ if (typeString == "rdf:RDF") continue; // no SP node yet
+ if (typeString == "inkscape:clipboard") continue; // SP node not necessary
+
SPObject* child = SPFactory::instance().createObject(typeString);
object->attach(child, object->lastChild());
sp_object_unref(child, NULL);
child->invoke_build(document, rchild, object->cloned);
} catch (const FactoryExceptions::TypeNotRegistered& e) {
- //g_warning("TypeNotRegistered exception: %s", e.what());
+ g_warning("TypeNotRegistered exception: %s", e.what());
}
}
}