|
From: Genete <ge...@us...> - 2010-09-03 18:50:32
|
Module: synfig/synfig Branch: genete_smart_link Commit: d2da88ea1ac6700186ee3eb02dc2b2c41a3c31da URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=d2da88ea1ac6700186ee3eb02dc2b2c41a3c31da Author: Carlos Lopez <gen...@gm...> Date: Fri Sep 3 20:36:36 2010 +0200 The value desc smart link now does the scale conversion. --- .../src/synfigapp/actions/valuedescsmartlink.cpp | 11 ++++++----- 1 files 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()); } |