From: Nikita Kitaev Date: Fri, 23 Oct 2009 03:59:41 +0000 (-0700) Subject: Filter out unparsable layers X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e043e154a31626e7141482d163a0232cae6ffd90;p=synfig.git Filter out unparsable layers This avoids the creation of extraneous canvases --- diff --git a/synfig-core/src/modules/mod_svg/svg_parser.cpp b/synfig-core/src/modules/mod_svg/svg_parser.cpp index ea36efa..d062ab5 100644 --- a/synfig-core/src/modules/mod_svg/svg_parser.cpp +++ b/synfig-core/src/modules/mod_svg/svg_parser.cpp @@ -217,6 +217,7 @@ void Svg_parser::parser_graphics(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ Glib::ustring nodename = node->get_name(); + if (nodename.compare("g")==0 || nodename.compare("path")==0 || nodename.compare("polygon")==0 || nodename.compare("rect")==0){} else return; //load sub-attributes Glib::ustring id =nodeElement->get_attribute_value("id");