From e043e154a31626e7141482d163a0232cae6ffd90 Mon Sep 17 00:00:00 2001 From: Nikita Kitaev Date: Thu, 22 Oct 2009 20:59:41 -0700 Subject: [PATCH] Filter out unparsable layers This avoids the creation of extraneous canvases --- synfig-core/src/modules/mod_svg/svg_parser.cpp | 1 + 1 file changed, 1 insertion(+) 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"); -- 2.7.4