Save static option for canvas parameter
authorCarlos Lopez <genetita@gmail.com>
Tue, 24 Aug 2010 15:03:55 +0000 (17:03 +0200)
committerCarlos Lopez <genetita@gmail.com>
Tue, 24 Aug 2010 15:03:55 +0000 (17:03 +0200)
synfig-core/src/synfig/loadcanvas.cpp
synfig-core/src/synfig/savecanvas.cpp

index 37c5d1d..e36c63a 100644 (file)
@@ -891,7 +891,12 @@ CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas)
                return parse_bline_point(element);
        else
        if(element->get_name()=="canvas")
-               return ValueBase(parse_canvas(element,canvas,true));
+       {
+               ValueBase ret;
+               ret.set(parse_canvas(element,canvas,true));
+               ret.set_static(parse_static(element));
+               return ret;
+       }
        else
        {
                error_unexpected_element(element,element->get_name());
index af459cb..7fe590d 100644 (file)
@@ -554,6 +554,8 @@ xmlpp::Element* encode_layer(xmlpp::Element* root,Layer::ConstHandle layer)
                                        xmlpp::Element *node=root->add_child("param");
                                        node->set_attribute("name",iter->get_name());
                                        node->set_attribute("use",child->get_relative_id(layer->get_canvas()));
+                                       if(value.get_static())
+                                               node->set_attribute("static", value.get_static()?"true":"false");
                                        continue;
                                }
                        }