From: Carlos Lopez Date: Sun, 29 Aug 2010 16:55:42 +0000 (+0200) Subject: Rearrange conditions for export action and fix bug 2956710 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=813c9518c88ab69610aa506392a33fc1560782b5;p=synfig.git Rearrange conditions for export action and fix bug 2956710 --- diff --git a/synfig-studio/src/synfigapp/actions/valuedescexport.cpp b/synfig-studio/src/synfigapp/actions/valuedescexport.cpp index 65252cf..b9fedcb 100644 --- a/synfig-studio/src/synfigapp/actions/valuedescexport.cpp +++ b/synfig-studio/src/synfigapp/actions/valuedescexport.cpp @@ -104,20 +104,19 @@ Action::ValueDescExport::is_candidate(const ParamList &x) if(candidate_check(get_param_vocab(),x)) { ValueDesc value_desc=x.find("value_desc")->second.get_value_desc(); - if(!value_desc || - value_desc.parent_is_canvas() || - (value_desc.is_value_node() && value_desc.get_value_node()->is_exported()) || - (value_desc.get_value_type()==ValueBase::TYPE_CANVAS && !value_desc.get_value().get(Canvas::Handle())->is_inline())) + if(!value_desc) + return false; + if(value_desc.get_value_type()==ValueBase::TYPE_CANVAS) + if(!value_desc.get_value().get(Canvas::Handle())) + return false; + if( + value_desc.parent_is_canvas() + || + (value_desc.is_value_node() && value_desc.get_value_node()->is_exported()) + || + (value_desc.get_value_type()==ValueBase::TYPE_CANVAS && !value_desc.get_value().get(Canvas::Handle())->is_inline()) + ) { -// if (!value_desc) -// synfig::info("%s:%d no export because no value_desc", __FILE__, __LINE__); -// else if (value_desc.parent_is_canvas()) -// synfig::info("%s:%d no export because parent is canvas", __FILE__, __LINE__); -// else if (value_desc.is_value_node() && value_desc.get_value_node()->is_exported()) -// synfig::info("%s:%d no export because exported value node", __FILE__, __LINE__); -// else if (value_desc.get_value_type()==ValueBase::TYPE_CANVAS && !value_desc.get_value().get(Canvas::Handle())->is_inline()) -// synfig::info("%s:%d no export because canvas isn't inline", __FILE__, __LINE__); - return false; } return true;