From f09755cabb4501e20aab086fb6a02085a417b56c Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 14 Oct 2007 00:00:33 +0000 Subject: [PATCH] When loading a canvas fails because of undefined valuenodes, show the IDs of the undefined nodes. git-svn-id: http://svn.voria.com/code@927 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/loadcanvas.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp index 5f5b52c..0b82e41 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ b/synfig-core/trunk/src/synfig/loadcanvas.cpp @@ -2044,7 +2044,17 @@ CanvasParser::parse_canvas(xmlpp::Element *element,Canvas::Handle parent,bool in if(canvas->value_node_list().placeholder_count()) { - error(element,strprintf(_("Canvas %s has undefined ValueNodes"),canvas->get_id().c_str())); + String nodes; + for (ValueNodeList::const_iterator iter = canvas->value_node_list().begin(); iter != canvas->value_node_list().end(); iter++) + if(PlaceholderValueNode::Handle::cast_dynamic(*iter)) + { + if (nodes != "") nodes += ", "; + nodes += "'" + (*iter)->get_id() + "'"; + } + error(element,strprintf(_("Canvas '%s' has undefined %s: %s"), + canvas->get_id().c_str(), + canvas->value_node_list().placeholder_count() == 1 ? _("ValueNode") : _("ValueNodes"), + nodes.c_str())); } return canvas; -- 2.7.4