From: Carlos Lopez Date: Tue, 24 Aug 2010 16:08:35 +0000 (+0200) Subject: Inline Canvases cannot be static or not static as they depends on the layers below. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d89cce8e78eddd1edfd63a3048a5083638dc8b22;p=synfig.git Inline Canvases cannot be static or not static as they depends on the layers below. --- diff --git a/synfig-studio/src/synfigapp/actions/layerparamsetstatic.cpp b/synfig-studio/src/synfigapp/actions/layerparamsetstatic.cpp index 24d3be4..7676f41 100644 --- a/synfig-studio/src/synfigapp/actions/layerparamsetstatic.cpp +++ b/synfig-studio/src/synfigapp/actions/layerparamsetstatic.cpp @@ -99,9 +99,12 @@ Action::LayerParamSetStatic::is_candidate(const ParamList &x) //!Check that the parameter is not Value Node (Const, Animated or Linkable) if(_layer->dynamic_param_list().count(_param_name)) return false; - //! Retrieves the current parameter parameter = _layer->get_param(_param_name); + //! Check that the parameter is not a inline canvas + if(parameter.get_type()==ValueBase::TYPE_CANVAS) + if(parameter.get(Canvas::Handle())->is_inline()) + return false; //! Check if it is already static if(parameter.get_static()) return false; diff --git a/synfig-studio/src/synfigapp/actions/layerparamunsetstatic.cpp b/synfig-studio/src/synfigapp/actions/layerparamunsetstatic.cpp index 4012c9e..00fbc10 100644 --- a/synfig-studio/src/synfigapp/actions/layerparamunsetstatic.cpp +++ b/synfig-studio/src/synfigapp/actions/layerparamunsetstatic.cpp @@ -102,6 +102,10 @@ Action::LayerParamUnSetStatic::is_candidate(const ParamList &x) //! Retrieves the current parameter parameter = _layer->get_param(_param_name); + //! Check that the parameter is not a inline canvas + if(parameter.get_type()==ValueBase::TYPE_CANVAS) + if(parameter.get(Canvas::Handle())->is_inline()) + return false; //! Check if it is not static if(!parameter.get_static()) return false;