Improvements to interaction with waypoints in time-shifted canvases.
[synfig.git] / synfig-core / trunk / src / synfig / loadcanvas.cpp
index 8edd651..0b82e41 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -2043,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;