Revision: 2288 http://synfig.svn.sourceforge.net/synfig/?rev=2288&view=rev Author: dooglus Date: 2008-11-26 19:22:19 +0000 (Wed, 26 Nov 2008)
Log Message: ----------- Move the test for whether the duck is the correct type to before the distance calculation. Modified Paths: -------------- synfig-studio/trunk/src/gtkmm/duckmatic.cpp Modified: synfig-studio/trunk/src/gtkmm/duckmatic.cpp =================================================================== --- synfig-studio/trunk/src/gtkmm/duckmatic.cpp 2008-11-26 19:21:51 UTC (rev 2287) +++ synfig-studio/trunk/src/gtkmm/duckmatic.cpp 2008-11-26 19:22:19 UTC (rev 2288) @@ -881,8 +881,10 @@ { const Duck::Handle& duck(iter->second); - if(duck->get_ignore()) + if(duck->get_ignore() || + (duck->get_type() && !(type & duck->get_type()))) continue; + Real dist((duck->get_trans_point()-point).mag_squared()); if(duck->get_type()&Duck::TYPE_VERTEX) @@ -892,7 +894,7 @@ else if(duck->get_type()&Duck::TYPE_RADIUS) dist*=0.9999; - if(dist<closest && !( duck->get_type() && (!(type & duck->get_type())) ) ) + if(dist<closest) { closest=dist; ret=duck; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl