Module: synfig/synfig Branch: master Commit: fb79c2ed5d6bc0c8c2cdb11018a02d61aca1fdb7 URL: http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=fb79c2ed5d6bc0c8c2cdb11018a02d61aca1fdb7
Author: Carlos Lopez <[email protected]> Date: Mon Sep 6 20:22:51 2010 +0200 Fix bug 3060560: Link two tangents and one is animated, the animated is lost. --- .../src/synfigapp/actions/valuedesclink.cpp | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/synfig-studio/src/synfigapp/actions/valuedesclink.cpp b/synfig-studio/src/synfigapp/actions/valuedesclink.cpp index 66c736e..7f98228 100644 --- a/synfig-studio/src/synfigapp/actions/valuedesclink.cpp +++ b/synfig-studio/src/synfigapp/actions/valuedesclink.cpp @@ -180,6 +180,25 @@ Action::ValueDescLink::set_param(const synfig::String& name, const Action::Param status_message = _("There's a tie for most referenced, and both are animated; using the one with the most waypoints."); } } + // If both are Linkable Value Nodes and has waypoint in its children, use the one with more waypoints + else if(LinkableValueNode::Handle::cast_dynamic(link_value_node) && + LinkableValueNode::Handle::cast_dynamic(value_desc.get_value_node()) && + LinkableValueNode::Handle::cast_dynamic(link_value_node)->get_times().size() != + LinkableValueNode::Handle::cast_dynamic(value_desc.get_value_node())->get_times().size()) + { + if(LinkableValueNode::Handle::cast_dynamic(link_value_node)->get_times().size() < + LinkableValueNode::Handle::cast_dynamic(value_desc.get_value_node())->get_times().size()) + { + status_level = 4; + status_message = _("There's a tie for most referenced, and both are linkable value node animated; using the one with the most waypoints."); + link_value_node=value_desc.get_value_node(); + } + else if (status_level <= 4) + { + status_level = 4; + status_message = _("There's a tie for most referenced, and both are linkable value node animated; using the one with the most waypoints."); + } + } // Use the one that was least recently changed else if(link_value_node->get_time_last_changed()!=value_desc.get_value_node()->get_time_last_changed()) { ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Synfig-devl mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synfig-devl
