Removed a bunch more DEBUGPOINT()s.
[synfig.git] / synfig-core / trunk / src / synfig / loadcanvas.cpp
index c0e3f6f..199a609 100644 (file)
@@ -856,7 +856,6 @@ CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas)
                return ValueBase(parse_canvas(element,canvas,true));
        else
        {
-               DEBUGPOINT();
                error_unexpected_element(element,element->get_name());
        }
 
@@ -889,7 +888,7 @@ CanvasParser::parse_animated(xmlpp::Element *element,Canvas::Handle canvas)
 
        if(!value_node)
        {
-               error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_name(type).c_str()));
+               error(element,strprintf(_("Unable to create <animated> with type \"%s\""),ValueBase::type_local_name(type).c_str()));
                return ValueNode_Animated::Handle();
        }
 
@@ -1068,7 +1067,7 @@ CanvasParser::parse_animated(xmlpp::Element *element,Canvas::Handle canvas)
                if (parent->get_version() == "0.1")
                {
                        bool first = true;
-                       Real angle, prev;
+                       Real angle, prev = 0;
                        WaypointList &wl = value_node->waypoint_list();
                        for (WaypointList::iterator iter = wl.begin(); iter != wl.end(); iter++)
                        {
@@ -1198,8 +1197,8 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle c
                        else
                        if(!value_node->set_link(index,link))
                        {
-                               //error(dynamic_cast<xmlpp::Element*>(*iter),strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
-                               error(element,strprintf("Unable to connect value node ('%s' of type '%s') to link %d",link->get_name().c_str(),ValueBase::type_name(link->get_type()).c_str(),index));
+                               //error(dynamic_cast<xmlpp::Element*>(*iter),strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d"),link->get_name().c_str(),ValueBase::type_local_name(link->get_type()).c_str(),index));
+                               error(element,strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d"),link->get_name().c_str(),ValueBase::type_local_name(link->get_type()).c_str(),index));
                        }
 
                        // \todo do a search for more elements and warn if they are found
@@ -1630,6 +1629,7 @@ CanvasParser::parse_value_node(xmlpp::Element *element,Canvas::Handle canvas)
        {
                error_unexpected_element(element,element->get_name());
                error(element, "Expected a ValueNode");
+               value_node=PlaceholderValueNode::create();
        }