When loading a canvas fails because of undefined valuenodes, show the IDs of the...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 14 Oct 2007 00:00:33 +0000 (00:00 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 14 Oct 2007 00:00:33 +0000 (00:00 +0000)
git-svn-id: http://svn.voria.com/code@927 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/loadcanvas.cpp

index 5f5b52c..0b82e41 100644 (file)
@@ -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;