From d2da88ea1ac6700186ee3eb02dc2b2c41a3c31da Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Fri, 3 Sep 2010 20:36:36 +0200 Subject: [PATCH] The value desc smart link now does the scale conversion. --- synfig-studio/src/synfigapp/actions/valuedescsmartlink.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/synfig-studio/src/synfigapp/actions/valuedescsmartlink.cpp b/synfig-studio/src/synfigapp/actions/valuedescsmartlink.cpp index 9955984..c2dd762 100644 --- a/synfig-studio/src/synfigapp/actions/valuedescsmartlink.cpp +++ b/synfig-studio/src/synfigapp/actions/valuedescsmartlink.cpp @@ -273,7 +273,7 @@ Action::ValueDescSmartLink::prepare() throw Error(Error::TYPE_NOTREADY); clear(); -/* + if(value_desc_list.size()!=2) throw Error(Error::TYPE_BUG); @@ -284,11 +284,13 @@ Action::ValueDescSmartLink::prepare() if(!link_value_node) { + // we should have a value node selected because is candidate + // should have checked it before throw Error(Error::TYPE_BUG); } //Study the particular case of two tangents of a bline being linked. - ValueDesc& toconvert; + ValueDesc& toconvert(value_desc_t2); if(t1==link_value_node) { // Convert t2 @@ -303,17 +305,16 @@ Action::ValueDescSmartLink::prepare() } else { synfig::info("error"); } - Action::Handle action(Action::create("ValueDescConvert")); action->set_param("canvas",get_canvas()); action->set_param("canvas_interface",get_canvas_interface()); action->set_param("time",time); - action->set_param("type","scalar"); + action->set_param("type","scale"); action->set_param("value_desc",toconvert); assert(action->is_ready()); if(!action->is_ready()) throw Error(Error::TYPE_NOTREADY); add_action_front(action); -*/ + synfig::info("http://synfig.org/Linking#Tier_%d : %s", status_level, status_message.c_str()); } -- 2.7.4