From: <ro...@sy...> - 2011-10-30 14:41:11
|
Author: Carlos Lopez <gen...@gm...> Date: Tue Oct 25 21:52:05 2011 +0200 Fix wrong lower and upper boundaries calculation when extending bline from end --- synfig-studio/src/gui/states/state_draw.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synfig-studio/src/gui/states/state_draw.cpp b/synfig-studio/src/gui/states/state_draw.cpp index 0a33611..8b33068 100644 --- a/synfig-studio/src/gui/states/state_draw.cpp +++ b/synfig-studio/src/gui/states/state_draw.cpp @@ -2278,11 +2278,11 @@ StateDraw_Context::extend_bline_from_end(ValueNode_BLine::Handle value_node,std: int s2(value_node_size-1); if(homogeneous) { - ub_new=lb+(l1+l2)*range/l1; + ub_new=lb+(l1+l2)*range/l2; } else { - ub_new=lb+(s1+s2)*range/s1; + ub_new=lb+(s1+s2)*range/s2; } } else @@ -2329,11 +2329,11 @@ StateDraw_Context::extend_bline_from_end(ValueNode_BLine::Handle value_node,std: int s2(value_node_size-1); if(homogeneous) { - witer->set_lower_bound(ub-(l1+l2)*range/l2); + witer->set_lower_bound(ub-(l1+l2)*range/l1); } else { - witer->set_lower_bound(ub-(s1+s2)*range/s2); + witer->set_lower_bound(ub-(s1+s2)*range/s1); } if(!action->set_param("item",ValueNode::Handle(ValueNode_Composite::create(*witer)))) synfig::error("ACTION didn't like \"item\""); |