Filter out unparsable layers
authorNikita Kitaev <nikitakit@gmail.com>
Fri, 23 Oct 2009 03:59:41 +0000 (20:59 -0700)
committerNikita Kitaev <nikitakit@gmail.com>
Sun, 25 Oct 2009 22:53:37 +0000 (15:53 -0700)
This avoids the creation of extraneous canvases

synfig-core/src/modules/mod_svg/svg_parser.cpp

index ea36efa..d062ab5 100644 (file)
@@ -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<const xmlpp::Element*>(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");