From: Carlos Lopez Date: Tue, 24 Aug 2010 15:03:55 +0000 (+0200) Subject: Save static option for canvas parameter X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0495f31309c6eee6850c06a2b559b00982164a36;p=synfig.git Save static option for canvas parameter --- diff --git a/synfig-core/src/synfig/loadcanvas.cpp b/synfig-core/src/synfig/loadcanvas.cpp index 37c5d1d..e36c63a 100644 --- a/synfig-core/src/synfig/loadcanvas.cpp +++ b/synfig-core/src/synfig/loadcanvas.cpp @@ -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()); diff --git a/synfig-core/src/synfig/savecanvas.cpp b/synfig-core/src/synfig/savecanvas.cpp index af459cb..7fe590d 100644 --- a/synfig-core/src/synfig/savecanvas.cpp +++ b/synfig-core/src/synfig/savecanvas.cpp @@ -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; } }